Moodle  2.2.1
http://www.collinsharper.com
admin_externalpage Class Reference
Inheritance diagram for admin_externalpage:
Collaboration diagram for admin_externalpage:

Public Member Functions

 __construct ($name, $visiblename, $url, $req_capability='moodle/site:config', $hidden=false, $context=NULL)
 locate ($name, $findpath=false)
 prune ($name)
 search ($query)
 check_access ()
 is_hidden ()
 show_save ()

Data Fields

 $name
 $visiblename
 $url
 $req_capability
 $context
 $hidden
 $path
 $visiblepath

Detailed Description

Links external PHP pages into the admin tree.

See detailed usage example at the top of this document (adminlib.php)

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

Definition at line 1053 of file adminlib.php.


Constructor & Destructor Documentation

__construct ( name,
visiblename,
url,
req_capability = 'moodle/site:config',
hidden = false,
context = NULL 
)

Constructor for adding an external page into the admin tree.

Parameters:
string$nameThe internal name for this external page. Must be unique amongst ALL part_of_admin_tree objects.
string$visiblenameThe displayed name for this external page. Usually obtained through get_string().
string$urlThe external URL that we should link to when someone requests this external page.
mixed$req_capabilityThe role capability/permission a user must have to access this external page. Defaults to 'moodle/site:config'.
boolean$hiddenIs this external page hidden in admin tree block? Default false.
stdClass$contextThe context the page relates to. Not sure what happens if you specify something other than system or front page. Defaults to system.

Definition at line 1090 of file adminlib.php.


Member Function Documentation

Determines if the current user has access to this external page based on $this->req_capability.

Returns:
bool True if user has access, false otherwise.

Implements part_of_admin_tree.

Definition at line 1163 of file adminlib.php.

Here is the call graph for this function:

is_hidden ( )

Is this external page hidden in admin tree block?

Returns:
bool True if hidden

Implements part_of_admin_tree.

Definition at line 1179 of file adminlib.php.

locate ( name,
findpath = false 
)

Returns a reference to the part_of_admin_tree object with internal name $name.

Parameters:
string$nameThe internal name of the object we want.
bool$findpathdefaults to false
Returns:
mixed A reference to the object with internal name $name if found, otherwise a reference to NULL.

Definition at line 1110 of file adminlib.php.

prune ( name)

This function always returns false, required function by interface

Parameters:
string$name
Returns:
false

Implements part_of_admin_tree.

Definition at line 1129 of file adminlib.php.

search ( query)

Search using query

Parameters:
string$query
Returns:
mixed array-object structure of found settings and pages

Implements part_of_admin_tree.

Reimplemented in admin_page_managefilters, admin_page_managerepositories, admin_page_manageportfolios, admin_page_manageqtypes, admin_page_manageqbehaviours, admin_page_managemessageoutputs, admin_page_manageblocks, and admin_page_managemods.

Definition at line 1139 of file adminlib.php.

Here is the call graph for this function:

show_save ( )

Show we display Save button at the page bottom?

Returns:
bool

Implements part_of_admin_tree.

Definition at line 1187 of file adminlib.php.


Field Documentation

Definition at line 1068 of file adminlib.php.

$hidden

Definition at line 1071 of file adminlib.php.

$name

Definition at line 1056 of file adminlib.php.

$path

Definition at line 1074 of file adminlib.php.

$req_capability

Definition at line 1065 of file adminlib.php.

$url

Definition at line 1062 of file adminlib.php.

$visiblename

Definition at line 1059 of file adminlib.php.

$visiblepath

Definition at line 1077 of file adminlib.php.


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