menue
in package
Class menue
Tags
Table of Contents
Properties
Methods
- __construct() : mixed
- __destruct() : mixed
- all() : array<string|int, mixed>|bool
- Retrieves all data from the table.
- delete() : bool
- Deletes a record based on the given value and column.
- generatenav() : string
- get() : array<string|int, mixed>|bool
- getlastsort() : string|bool
- getmenuepoints() : array<string|int, mixed>|bool
- insert() : string|bool
- Inserts a new record into the database.
- update() : bool
- Updates data in the table based on the given column, value, and menu ID.
- getall() : array<string|int, mixed>|bool
- Retrieves data based on the given column and value.
Properties
$tmenue
protected
tab_menue
$tmenue
Methods
__construct()
public
__construct() : mixed
__destruct()
public
__destruct() : mixed
all()
Retrieves all data from the table.
public
all([string $sort = 'parent' ][, string $dir = 'ASC' ]) : array<string|int, mixed>|bool
Parameters
- $sort : string = 'parent'
-
The column to sort the data by. Defaults to 'parent'.
- $dir : string = 'ASC'
-
The direction to sort the data in. Defaults to 'ASC'.
Return values
array<string|int, mixed>|bool —Returns an array of all the data if found, or false if no data is found.
delete()
Deletes a record based on the given value and column.
public
delete(string $val[, string $col = 'id' ]) : bool
Parameters
- $val : string
-
The value to search for in the specified column.
- $col : string = 'id'
-
The column to search for. Default is 'id'.
Return values
bool —Returns true if the record is successfully deleted, false otherwise.
generatenav()
public
generatenav() : string
Return values
stringget()
public
get(string $val[, string $col = 'id' ]) : array<string|int, mixed>|bool
Parameters
- $val : string
- $col : string = 'id'
Return values
array<string|int, mixed>|boolgetlastsort()
public
getlastsort(string $parent) : string|bool
Parameters
- $parent : string
Return values
string|boolgetmenuepoints()
public
getmenuepoints([string $type = '0' ]) : array<string|int, mixed>|bool
Parameters
- $type : string = '0'
Return values
array<string|int, mixed>|boolinsert()
Inserts a new record into the database.
public
insert(string $mod, string $pg, string $icon, string $parent, string $sort, string $is_admin) : string|bool
Parameters
- $mod : string
-
The module to insert.
- $pg : string
-
The page to insert.
- $icon : string
- $parent : string
-
The parent to insert.
- $sort : string
-
The sort to insert.
- $is_admin : string
Return values
string|bool —Returns the inserted ID on success, or false on failure.
update()
Updates data in the table based on the given column, value, and menu ID.
public
update(string $col, string $val, string $mid) : bool
Parameters
- $col : string
-
The column to update.
- $val : string
-
The new value for the specified column.
- $mid : string
-
The ID of the menu to update.
Return values
bool —Returns true if the update is successful, or false otherwise.
getall()
Retrieves data based on the given column and value.
private
getall(string $col, string $val) : array<string|int, mixed>|bool
Parameters
- $col : string
-
The column to search for.
- $val : string
-
The value to search for in the specified column.
Return values
array<string|int, mixed>|bool —Returns an array of data if found, or false if no data is found.