Root of admin settings tree, does not have any parent.
More...
|
mixed | $custom_defaults |
| site custom defaults overriding defaults in settings files
|
|
array | $errors |
| List of errors.
|
|
bool | $fulltree |
| full tree flag - true means all settings required, false only pages required
|
|
bool | $hidden |
| Should this category be hidden in admin tree block?
|
|
bool | $loaded |
| flag indicating loaded tree
|
|
string | $name |
| An internal name for this category. More...
|
|
mixed | $path |
| Either a string or an array or strings.
|
|
string | $search |
| search query
|
|
string | $visiblename |
| The displayed name for this category. More...
|
|
mixed | $visiblepath |
| Either a string or an array or strings.
|
|
|
array | $category_cache |
| fast lookup category cache, all categories of one tree point to one cache
|
|
part_of_admin_tree[] | $children |
| An array of part_of_admin_tree objects that are this object's children.
|
|
bool | $sort = false |
| If set to true children will be sorted when calling admin_category::get_children().
|
|
bool | $sortasc = true |
| If set to true children will be sorted in ascending order.
|
|
bool | $sorted = false |
| $sorted True if the children have been sorted and don't need resorting
|
|
bool | $sortsplit = true |
| If set to true sub categories and pages will be split and then sorted. More...
|
|
Root of admin settings tree, does not have any parent.
- License
- http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
◆ __construct()
admin_root::__construct |
( |
|
$fulltree | ) |
|
- Parameters
-
bool | $fulltree | true means all settings required, false only pages required |
◆ __get()
admin_category::__get |
( |
|
$property | ) |
|
|
inherited |
Magically gets a property from this object.
- Parameters
-
- Return values
-
- Exceptions
-
◆ __isset()
admin_category::__isset |
( |
|
$property | ) |
|
|
inherited |
Checks if an inaccessible property is set.
- Parameters
-
- Return values
-
- Exceptions
-
◆ __set()
admin_category::__set |
( |
|
$property, |
|
|
|
$value |
|
) |
| |
|
inherited |
Magically sets a property against this object.
- Parameters
-
string | $property | |
mixed | $value | |
- Exceptions
-
◆ add()
admin_category::add |
( |
|
$parentname, |
|
|
|
$something, |
|
|
|
$beforesibling = null |
|
) |
| |
|
inherited |
Adds a part_of_admin_tree to a child or grandchild (or great-grandchild, and so forth) of this object.
By default the new part of the tree is appended as the last child of the parent. You can specify a sibling node that the new part should be prepended to. If the given sibling is not found, the part is appended to the end (as it would be by default) and a developer debugging message is displayed.
- Exceptions
-
- Parameters
-
string | $destinationame | The internal name of the immediate parent that we want for $something. |
mixed | $something | A part_of_admin_tree or setting instance to be added. |
string | $beforesibling | The name of the parent's child the $something should be prepended to. |
- Return values
-
bool | True if successfully added, false if $something can not be added. |
Implements parentable_part_of_admin_tree.
◆ check_access()
admin_category::check_access |
( |
| ) |
|
|
inherited |
Checks if the user has access to anything in this category.
- Return values
-
bool | True if the user has access to at least one child in this category, false otherwise. |
Implements part_of_admin_tree.
◆ get_children()
admin_category::get_children |
( |
| ) |
|
|
inherited |
Returns the children associated with this category.
- Return values
-
◆ is_hidden()
admin_category::is_hidden |
( |
| ) |
|
|
inherited |
◆ locate() [1/2]
part_of_admin_tree::locate |
( |
|
$name | ) |
|
|
inherited |
Finds a named part_of_admin_tree.
Used to find a part_of_admin_tree. If a class only inherits part_of_admin_tree and not parentable_part_of_admin_tree, then this function should only check if $this->name matches $name. If it does, it should return a reference to $this, otherwise, it should return a reference to NULL.
If a class inherits parentable_part_of_admin_tree, this method should be called recursively on all child objects (assuming, of course, the parent object's name doesn't match the search criterion).
- Parameters
-
- Return values
-
mixed | An object reference or a NULL reference. |
◆ locate() [2/2]
admin_category::locate |
( |
|
$name, |
|
|
|
$findpath = false |
|
) |
| |
|
inherited |
Returns a reference to the part_of_admin_tree object with internal name $name.
- Parameters
-
string | $name | The internal name of the object we want. |
bool | $findpath | initialize path and visiblepath arrays |
- Return values
-
mixed | A reference to the object with internal name $name if found, otherwise a reference to NULL. defaults to false |
◆ prune()
admin_category::prune |
( |
|
$name | ) |
|
|
inherited |
◆ purge_children()
admin_root::purge_children |
( |
|
$requirefulltree | ) |
|
Empties children array, and sets loaded to false.
- Parameters
-
◆ search()
admin_category::search |
( |
|
$query | ) |
|
|
inherited |
Search using query.
- Parameters
-
- Return values
-
mixed | array-object structure of found settings and pages |
Implements part_of_admin_tree.
◆ set_sorting()
admin_category::set_sorting |
( |
|
$sort, |
|
|
|
$asc = true , |
|
|
|
$split = true |
|
) |
| |
|
inherited |
Sets sorting on this category.
Please note this function doesn't actually do the sorting. It can be called anytime. Sorting occurs when the user calls get_children. Code using the children array directly won't see the sorted results.
- Parameters
-
bool | $sort | If set to true children will be sorted, if false they won't be. |
bool | $asc | If true sorting will be ascending, otherwise descending. |
bool | $split | If true we sort pages and sub categories separately. |
◆ show_save()
admin_category::show_save |
( |
| ) |
|
|
inherited |
Show we display Save button at the page bottom?
- Return values
-
Implements part_of_admin_tree.
◆ $name
string admin_category::$name |
|
inherited |
◆ $sortsplit
bool admin_category::$sortsplit = true |
|
protectedinherited |
If set to true sub categories and pages will be split and then sorted.
◆ $visiblename
string admin_category::$visiblename |
|
inherited |
The displayed name for this category.
Usually obtained through get_string()
The documentation for this class was generated from the following file: