Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
|
CLASS DEFINITIONS /////////////////////////////////////////////////////////. More...
Public Member Functions | |
check_access () | |
Verifies current user's access to this part_of_admin_tree. | |
is_hidden () | |
Mostly useful for removing of some parts of the tree in admin tree block. | |
locate ($name) | |
Finds a named part_of_admin_tree. | |
prune ($name) | |
Removes named part_of_admin_tree. | |
search ($query) | |
Search using query. | |
show_save () | |
Show we display Save button at the page bottom? | |
CLASS DEFINITIONS /////////////////////////////////////////////////////////.
Interface for anything appearing in the admin tree
The interface that is implemented by anything that appears in the admin tree block. It forces inheriting classes to define a method for checking user permissions and methods for finding something in the admin tree.
part_of_admin_tree::check_access | ( | ) |
Verifies current user's access to this part_of_admin_tree.
Used to check if the current user has access to this part of the admin tree or not. If a class only inherits part_of_admin_tree and not parentable_part_of_admin_tree, then this method is usually just a call to has_capability() in the site context.
If a class inherits parentable_part_of_admin_tree, this method should return the logical OR of the return of check_access() on all child objects.
bool | True if the user has access, false if she doesn't. |
Implemented in admin_category, admin_externalpage, admin_settingpage, and core_admin\local\externalpage\accesscallback.
part_of_admin_tree::is_hidden | ( | ) |
Mostly useful for removing of some parts of the tree in admin tree block.
bool | True is hidden from normal list view |
Implemented in admin_category, admin_externalpage, and admin_settingpage.
part_of_admin_tree::locate | ( | $name | ) |
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).
string | $name | The internal name of the part_of_admin_tree we're searching for. |
mixed | An object reference or a NULL reference. |
part_of_admin_tree::prune | ( | $name | ) |
Removes named part_of_admin_tree.
string | $name | The internal name of the part_of_admin_tree we want to remove. |
bool | success. |
Implemented in admin_category, admin_externalpage, and admin_settingpage.
part_of_admin_tree::search | ( | $query | ) |
Search using query.
string | $query |
mixed | array-object structure of found settings and pages |
Implemented in admin_category, admin_externalpage, admin_page_manageblocks, admin_page_managefilters, admin_page_managemessageoutputs, admin_page_managemods, admin_page_manageportfolios, admin_page_manageqbehaviours, admin_page_manageqtypes, admin_page_managerepositories, admin_settingpage, assign_admin_page_manage_assign_plugins, and mod_bigbluebuttonbn\local\plugins\admin_page_manage_extensions.
part_of_admin_tree::show_save | ( | ) |
Show we display Save button at the page bottom?
bool |
Implemented in admin_category, admin_externalpage, and admin_settingpage.