Moodle  2.2.1
http://www.collinsharper.com
part_of_admin_tree Interface Reference

CLASS DEFINITIONS /////////////////////////////////////////////////////////. More...

Inheritance diagram for part_of_admin_tree:

Public Member Functions

 locate ($name)
 prune ($name)
 search ($query)
 check_access ()
 is_hidden ()
 show_save ()

Detailed Description

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.

http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later

Definition at line 676 of file adminlib.php.


Member Function Documentation

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.

Returns:
bool True if the user has access, false if she doesn't.

Implemented in admin_settingpage, admin_externalpage, and admin_category.

is_hidden ( )

Mostly useful for removing of some parts of the tree in admin tree block.

Returns:
True is hidden from normal list view

Implemented in admin_settingpage, admin_externalpage, and admin_category.

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).

Parameters:
string$nameThe internal name of the part_of_admin_tree we're searching for.
Returns:
mixed An object reference or a NULL reference.
prune ( name)

Removes named part_of_admin_tree.

Parameters:
string$nameThe internal name of the part_of_admin_tree we want to remove.
Returns:
bool success.

Implemented in admin_settingpage, admin_externalpage, and admin_category.

show_save ( )

Show we display Save button at the page bottom?

Returns:
bool

Implemented in admin_settingpage, admin_externalpage, and admin_category.


The documentation for this interface was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations