|
Moodle
2.2.1
http://www.collinsharper.com
|

Definition at line 90 of file pagelib.php.
| __get | ( | $ | name | ) |
PHP overloading magic to make the $PAGE->course syntax work by redirecting it to the corresponding $PAGE->magic_get_course() method if there is one, and throwing an exception if not.
| $name | string property name |
Definition at line 614 of file pagelib.php.
| __set | ( | $ | name, |
| $ | value | ||
| ) |
PHP overloading magic which prevents the $PAGE->context = $context; syntax
| $name | string property name |
| $name | mixed value |
Definition at line 630 of file pagelib.php.
| add_alternate_version | ( | $ | title, |
| $ | url, | ||
| $ | mimetype | ||
| ) |
There can be alternate versions of some pages (for example an RSS feed version). If such other version exist, call this method, and a link to the alternate version will be included in the <head> of the page.
| $title | The title to give the alternate version. |
| $url | The URL of the alternate version. |
| $mimetype | The mime-type of the alternate version. |
Definition at line 1038 of file pagelib.php.
| add_body_class | ( | $ | class | ) |
| string | $class | add this class name ot the class attribute on the body tag. |
Definition at line 900 of file pagelib.php.

| add_body_classes | ( | $ | classes | ) |
| array | $classes | this utility method calls add_body_class for each array element. |
Definition at line 910 of file pagelib.php.


| all_editing_caps | ( | ) | [protected] |
Reimplemented in testable_moodle_page.
Definition at line 1539 of file pagelib.php.

Definition at line 1598 of file pagelib.php.

Definition at line 1606 of file pagelib.php.

Definition at line 1589 of file pagelib.php.

| blocks_move_position | ( | &$ | instance, |
| $ | move | ||
| ) |
Definition at line 1613 of file pagelib.php.

| debug_summary | ( | ) |
Definition at line 693 of file pagelib.php.

| ensure_categories_loaded | ( | ) | [protected] |
Definition at line 1501 of file pagelib.php.


| ensure_category_loaded | ( | ) | [protected] |
Definition at line 1473 of file pagelib.php.


| ensure_param_not_in_url | ( | $ | param | ) |
Make sure page URL does not contain the given URL parameter.
This should not be necessary if the script has called set_url properly. However, in some situations like the block editing actions; when the URL has been guessed, it will contain dangerous block-related actions. Therefore, the blocks code calls this function to clean up such parameters before doing any redirect.
| string | $param | the name of the parameter to make sure is not in the page URL. |
Definition at line 1024 of file pagelib.php.
| ensure_theme_not_set | ( | ) | [protected] |
Definition at line 1515 of file pagelib.php.


| force_theme | ( | $ | themename | ) |
Force this page to use a particular theme.
Please use this cautiously. It is only intended to be used by the themes selector admin page.
| $themename | the name of the theme to use. |
Definition at line 1124 of file pagelib.php.

| get_courserecord | ( | ) |
Definition at line 1568 of file pagelib.php.

| get_format_name | ( | ) |
Definition at line 1560 of file pagelib.php.
| get_id | ( | ) |
Reimplemented in page_base.
Definition at line 1668 of file pagelib.php.

| get_legacyclass | ( | ) |
Definition at line 1577 of file pagelib.php.

| get_modulerecord | ( | ) |
Definition at line 1692 of file pagelib.php.
| get_pageid | ( | ) |
Definition at line 1680 of file pagelib.php.

Are popup notifications allowed on this page? Popup notifications may be disallowed in situations such as while upgrading or completing a quiz
Definition at line 1709 of file pagelib.php.
| get_renderer | ( | $ | component, |
| $ | subtype = null, |
||
| $ | target = null |
||
| ) |
Other information getting methods ==========================================.
Returns instance of page renderer
| string | $component | name such as 'core', 'mod_forum' or 'qtype_multichoice'. |
| string | $subtype | optional subtype such as 'news' resulting to 'mod_forum_news' |
| string | $target | one of rendering target constants |
Definition at line 647 of file pagelib.php.


| get_type | ( | ) |
Deprecated fields and methods for backwards compatibility ==================.
Definition at line 1551 of file pagelib.php.

| has_navbar | ( | ) |
Checks to see if there are any items on the navbar object
Definition at line 655 of file pagelib.php.
| has_set_url | ( | ) |
Definition at line 1696 of file pagelib.php.
| https_required | ( | ) |
This function indicates that current page requires the https when $CFG->loginhttps enabled.
By using this function properly, we can ensure 100% https-ized pages at our entire discretion (login, forgot_password, change_password)
Definition at line 1137 of file pagelib.php.

| initialise_default_pagetype | ( | $ | script = null | ) | [protected] |
Sets ->pagetype from the script name. For example, if the script that was run is mod/quiz/view.php, ->pagetype will be set to 'mod-quiz-view'.
| string | $script | the path to the script that should be used to initialise ->pagetype. If not passed the $SCRIPT global will be used. If legacy code has set $CFG->pagepath that will be used instead, and a developer warning issued. |
Reimplemented in testable_moodle_page.
Definition at line 1363 of file pagelib.php.


| initialise_standard_body_classes | ( | ) | [protected] |
Definition at line 1393 of file pagelib.php.


Method for use by Moodle core to set up the theme. Do not use this in your own code.
Make sure the right theme for this page is loaded. Tell our blocks_manager about the theme block regions, and then, if we are $PAGE, set up the global $OUTPUT.
Definition at line 1244 of file pagelib.php.


| load_activity_record | ( | ) | [protected] |
| load_category | ( | $ | categoryid | ) | [protected] |
| magic_get_activityname | ( | ) | [protected] |
Please do not call this method directly, use the ->activityname syntax. __get().
Definition at line 300 of file pagelib.php.
| magic_get_activityrecord | ( | ) | [protected] |
Please do not call this method directly, use the ->activityrecord syntax. __get().
Definition at line 288 of file pagelib.php.

| magic_get_alternateversions | ( | ) | [protected] |
The list of alternate versions of this page.
Definition at line 461 of file pagelib.php.
| magic_get_blocks | ( | ) | [protected] |
Please do not call this method directly, use the ->blocks syntax. __get().
Definition at line 469 of file pagelib.php.
| magic_get_bodyclasses | ( | ) | [protected] |
Please do not call this method directly, use the ->bodyclasses syntax. __get().
Definition at line 401 of file pagelib.php.
| magic_get_bodyid | ( | ) | [protected] |
Please do not call this method directly, use the ->pagetype syntax. __get().
Definition at line 368 of file pagelib.php.
| magic_get_button | ( | ) | [protected] |
Please do not call this method directly, use the ->button syntax. __get().
Definition at line 514 of file pagelib.php.
| magic_get_cacheable | ( | ) | [protected] |
Please do not call this method directly, use the ->cacheable syntax. __get().
Definition at line 498 of file pagelib.php.
| magic_get_categories | ( | ) | [protected] |
Please do not call this method directly, use the ->categories syntax. __get().
Definition at line 328 of file pagelib.php.

| magic_get_category | ( | ) | [protected] |
Please do not call this method directly, use the ->category syntax. __get().
Definition at line 312 of file pagelib.php.

| magic_get_cm | ( | ) | [protected] |
Please do not call this method directly, use the ->cm syntax. __get().
Definition at line 278 of file pagelib.php.
| magic_get_context | ( | ) | [protected] |
Please do not call this method directly, use the ->context syntax. __get().
Definition at line 337 of file pagelib.php.


| magic_get_course | ( | ) | [protected] |
Please do not call this method directly, use the ->course syntax. __get().
object
Definition at line 262 of file pagelib.php.
| magic_get_devicetypeinuse | ( | ) | [protected] |
Please do not call this method directly, use the ->devicetypeinuse syntax. __get().
Definition at line 534 of file pagelib.php.

| magic_get_docspath | ( | ) | [protected] |
Please do not call this method directly, use the ->docspath syntax. __get().
Definition at line 433 of file pagelib.php.
| magic_get_focuscontrol | ( | ) | [protected] |
Please do not call this method directly, use the ->focuscontrol syntax. __get().
Definition at line 506 of file pagelib.php.
| magic_get_headerprinted | ( | ) | [protected] |
Please do not call this method directly, use the ->headerprinted syntax. __get().
Definition at line 250 of file pagelib.php.
| magic_get_heading | ( | ) | [protected] |
Please do not call this method directly, use the ->heading syntax. __get().
Definition at line 417 of file pagelib.php.
| magic_get_headingmenu | ( | ) | [protected] |
Please do not call this method directly, use the ->heading syntax. __get().
Definition at line 425 of file pagelib.php.
| magic_get_layout_options | ( | ) | [protected] |
Please do not call this method directly, use the ->layout_tions syntax. __get().
Definition at line 385 of file pagelib.php.
| magic_get_legacythemeinuse | ( | ) | [protected] |
Please do not call this method directly, use the ->legacythemeinuse syntax. __get().
Definition at line 546 of file pagelib.php.

| magic_get_navbar | ( | ) | [protected] |
| magic_get_navigation | ( | ) | [protected] |
| magic_get_opencontainers | ( | ) | [protected] |
Please do not call this method directly use the ->opencontainers syntax. __get()
Definition at line 565 of file pagelib.php.
| magic_get_pagelayout | ( | ) | [protected] |
Please do not call this method directly, use the ->pagelayout syntax. __get().
Definition at line 377 of file pagelib.php.
| magic_get_pagetype | ( | ) | [protected] |
Please do not call this method directly, use the ->pagetype syntax. __get().
Definition at line 356 of file pagelib.php.

| magic_get_periodicrefreshdelay | ( | ) | [protected] |
Please do not call this method directly use the ->periodicrefreshdelay syntax __get()
Definition at line 556 of file pagelib.php.
| magic_get_requires | ( | ) | [protected] |
Please do not call this method directly, use the ->requires syntax. __get().
Definition at line 486 of file pagelib.php.
| magic_get_settingsnav | ( | ) | [protected] |
Returns the settings navigation object
Definition at line 598 of file pagelib.php.
| magic_get_state | ( | ) | [protected] |
Magic getter methods ============================================================= Due to the __get magic below, you normally do not call these as $PAGE->magic_get_x methods, but instead use the $PAGE->x syntax. Please do not call this method directly, use the ->state syntax. __get().
Definition at line 242 of file pagelib.php.
| magic_get_subpage | ( | ) | [protected] |
Please do not call this method directly, use the ->subpage syntax. __get().
Definition at line 393 of file pagelib.php.
| magic_get_theme | ( | ) | [protected] |
Please do not call this method directly, use the ->theme syntax. __get().
Definition at line 522 of file pagelib.php.


| magic_get_title | ( | ) | [protected] |
Please do not call this method directly, use the ->title syntax. __get().
Definition at line 409 of file pagelib.php.
| magic_get_url | ( | ) | [protected] |
Please do not call this method directly, use the ->url syntax. __get().
Definition at line 446 of file pagelib.php.

| print_header | ( | $ | _ | ) |
| $_,... |
Definition at line 1655 of file pagelib.php.

| resolve_theme | ( | ) | [protected] |
Work out the theme this page should use.
This depends on numerous $CFG settings, and the properties of this page.
Definition at line 1282 of file pagelib.php.


| set_activity_record | ( | $ | module | ) |
| $module | a row from the main database table for the module that this page belongs to. For example, if ->cm is a forum, then you can pass the corresponding row from the forum table here if you have it (saves a database query sometimes). |
Definition at line 844 of file pagelib.php.

| set_block_actions_done | ( | $ | setting = true | ) |
Definition at line 1700 of file pagelib.php.
| set_blocks_editing_capability | ( | $ | capability | ) |
Set the capability that allows users to edit blocks on this page. Normally the default of 'moodle/site:manageblocks' is used, but a few pages like the My Moodle page need to use a different capability like 'moodle/my:manageblocks'.
| string | $capability | a capability. |
Definition at line 1072 of file pagelib.php.
| set_button | ( | $ | html | ) |
Specify a fragment of HTML that goes where the 'Turn editing on' button normally goes.
| string | $html | the HTML to display there. |
Definition at line 1062 of file pagelib.php.

| set_cacheable | ( | $ | cacheable | ) |
Definition at line 1093 of file pagelib.php.
| set_category_by_id | ( | $ | categoryid | ) |
Set the course category this page belongs to manually. This automatically sets $PAGE->course to be the site course. You cannot use this method if you have already set $PAGE->course - in that case, the category must be the one that the course belongs to. This also automatically sets the page context to the category context.
| integer | $categoryid | The id of the category to set. |
Definition at line 947 of file pagelib.php.

| set_cm | ( | $ | cm, |
| $ | course = null, |
||
| $ | module = null |
||
| ) |
The course module that this page belongs to (if it does belong to one).
| stdClass | cm_info | $cm | a record from course_modules table or cm_info from get_fast_modinfo(). |
| stdClass | $course | |
| stdClass | $module |
Definition at line 803 of file pagelib.php.

| set_context | ( | $ | context | ) |
Set the main context to which this page belongs.
| object | $context | a context object, normally obtained with get_context_instance. |
Definition at line 767 of file pagelib.php.


| set_course | ( | $ | course | ) |
Set the current course. This sets both $PAGE->course and $COURSE. It also sets the right theme and locale.
Normally you don't need to call this function yourself, require_login will call it for you if you pass a $course to it. You can use this function on pages that do need to call require_login().
Sets $PAGE->context to the course context, if it is not already set.
| object | the course to set as the global course. |
Definition at line 738 of file pagelib.php.


| set_docs_path | ( | $ | path | ) |
Set a different path to use for the 'Moodle docs for this page' link. By default, it uses the pagetype, which is normally the same as the script name. So, for example, for mod/quiz/attempt.php, pagetype is mod-quiz-attempt, and so docspath is mod/quiz/attempt.
| string | $path | the path to use at the end of the moodle docs URL. |
Definition at line 968 of file pagelib.php.
| set_focuscontrol | ( | $ | controlid | ) |
Specify a form control should be focused when the page has loaded.
| string | $controlid | the id of the HTML element to be focused. |
Definition at line 1053 of file pagelib.php.
| set_heading | ( | $ | heading | ) |
| string | $heading | the main heading that should be displayed at the top of the <body>. |
Definition at line 928 of file pagelib.php.

| set_headingmenu | ( | $ | menu | ) |
| string | $menu | The menu/content to show in the heading |
Definition at line 935 of file pagelib.php.
| set_legacy_page_object | ( | $ | pageobject | ) |
Definition at line 1647 of file pagelib.php.
| set_other_editing_capability | ( | $ | capability | ) |
Some pages let you turn editing on for reasons other than editing blocks. If that is the case, you can pass other capabilities that let the user edit this page here.
| string | array | $capability | either a capability, or an array of capabilities. |
Definition at line 1082 of file pagelib.php.
| set_pagelayout | ( | $ | pagelayout | ) |
| string | $pagelayout | the page layout this is. For example 'popup', 'home'. This properly defaults to 'base', so you only need to call this function if you want something different. The exact range of supported layouts is specified in the standard theme. |
Uncomment this to debug theme pagelayout issues like missing blocks.
if (!empty($this->_wherethemewasinitialised) && $pagelayout != $this->_pagelayout) { debugging('Page layout has already been set and cannot be changed.', DEBUG_DEVELOPER); }
Definition at line 872 of file pagelib.php.
| set_pagetype | ( | $ | pagetype | ) |
| string | $pagetype | e.g. 'my-index' or 'mod-quiz-attempt'. Normally you do not need to set this manually, it is automatically created from the script name. However, on some pages this is overridden. For example, the page type for course/view.php includes the course format, for example 'course-view-weeks'. This gets used as the id attribute on <body> and also for determining which blocks are displayed. |
Definition at line 862 of file pagelib.php.
| set_periodic_refresh_delay | ( | $ | delay = null | ) |
Sets the page to periodically refresh
This function must be called before $OUTPUT->header has been called or a coding exception will be thrown.
| int | $delay | Sets the delay before refreshing the page, if set to null refresh is cancelled |
Definition at line 1106 of file pagelib.php.
| set_popup_notification_allowed | ( | $ | allowed | ) |
Allow or disallow popup notifications on this page. Popups are allowed by default.
| boolean | true if notifications are allowed. False if not allowed. They are allowed by default. |
Definition at line 1718 of file pagelib.php.
| set_state | ( | $ | state | ) |
Setter methods =============================================================.
Set the state. The state must be one of that STATE_... constants, and the state is only allowed to advance one step at a time.
| integer | $state | the new state. |
Definition at line 713 of file pagelib.php.

| set_subpage | ( | $ | subpage | ) |
If context->id and pagetype are not enough to uniquely identify this page, then you can set a subpage id as well. For example, the tags page sets
| string | $subpage | an arbitrary identifier that, along with context->id and pagetype, uniquely identifies this page. |
Definition at line 889 of file pagelib.php.
| set_title | ( | $ | title | ) |
| string | $title | the title that should go in the <head> section of the HTML of this page. |
Definition at line 919 of file pagelib.php.


You should call this method from every page to set the cleaned-up URL that should be used to return to this page. Used, for example, by the blocks editing UI to know where to return the user after an action. For example, course/view.php does: $id = optional_param('id', 0, PARAM_INT); $PAGE->set_url('/course/view.php', array('id' => $id));
| moodle_url | string | $url | URL relative to $CFG->wwwroot or moodle_url instance |
| array | $params | parameters to add to the URL |
Definition at line 982 of file pagelib.php.

| starting_output | ( | ) | [protected] |
Initialisation methods ===================================================== These set various things up in a default way. This method is called when the page first moves out of the STATE_BEFORE_HEADER state. This is our last change to initialise things.
Definition at line 1203 of file pagelib.php.


| url_get_full | ( | $ | extraparams = array() | ) |
Definition at line 1639 of file pagelib.php.

Definition at line 1621 of file pagelib.php.

| url_get_path | ( | ) |
Definition at line 1630 of file pagelib.php.

| url_to_class_name | ( | $ | url | ) | [protected] |
Reimplemented in testable_moodle_page.
Definition at line 1524 of file pagelib.php.

Definition at line 682 of file pagelib.php.


Definition at line 675 of file pagelib.php.

| user_is_editing | ( | ) |
Definition at line 667 of file pagelib.php.


Makes sure that page previously marked with https_required() is really using https://, if not it redirects to https://
Definition at line 1161 of file pagelib.php.

$_alternateversions = array() [protected] |
Definition at line 159 of file pagelib.php.
$_block_actions_done = false [protected] |
Definition at line 167 of file pagelib.php.
$_blocks = null [protected] |
Definition at line 161 of file pagelib.php.
$_blockseditingcap = 'moodle/site:manageblocks' [protected] |
Definition at line 165 of file pagelib.php.
$_bodyclasses = array() [protected] |
Definition at line 133 of file pagelib.php.
$_button = '' [protected] |
Definition at line 175 of file pagelib.php.
$_cacheable = true [protected] |
Definition at line 171 of file pagelib.php.
$_categories = null [protected] |
This holds any categories that $_course belongs to, starting with the particular category it belongs to, and working out through any parent categories to the top level. These are loaded progressively, if needed. There are three states. $_categories = null initially when nothing is loaded; $_categories = array($id => $cat, $parentid => null) when we have loaded $_course->category, but not any parents; and a complete array once everything is loaded.
Definition at line 131 of file pagelib.php.
$_cm = null [protected] |
Definition at line 108 of file pagelib.php.
$_context = null [protected] |
The context that this page belongs to.
Definition at line 120 of file pagelib.php.
$_course = null [protected] |
Definition at line 102 of file pagelib.php.
$_devicetypeinuse = null [protected] |
Definition at line 225 of file pagelib.php.
$_docspath = null [protected] |
Definition at line 152 of file pagelib.php.
$_focuscontrol = '' [protected] |
Definition at line 173 of file pagelib.php.
$_heading = '' [protected] |
Definition at line 137 of file pagelib.php.
$_headingmenu = null [protected] |
Definition at line 185 of file pagelib.php.
$_https_login_required = false [protected] |
Definition at line 227 of file pagelib.php.
$_layout_options = array() [protected] |
Definition at line 148 of file pagelib.php.
$_legacybrowsers = array('MSIE' => 6.0) [protected] |
Definition at line 217 of file pagelib.php.
$_legacyclass = null [protected] |
Definition at line 155 of file pagelib.php.
$_legacypageobject = null [protected] |
This is simply to improve backwards compatibility. If old code relies on a page class that implements print_header, or complex logic in user_allowed_editing then we stash an instance of that other class here, and delegate to it in certain situations.
Definition at line 210 of file pagelib.php.
$_module = null [protected] |
If $_cm is not null, then this will hold the corresponding row from the modname table. For example, if $_cm->modname is 'quiz', this will be a row from the quiz table.
Definition at line 115 of file pagelib.php.
$_navbar = null [protected] |
Definition at line 183 of file pagelib.php.
$_navigation = null [protected] |
Definition at line 179 of file pagelib.php.
$_opencontainers [protected] |
Definition at line 194 of file pagelib.php.
$_othereditingcaps = array() [protected] |
Definition at line 169 of file pagelib.php.
$_pagelayout = 'base' [protected] |
Definition at line 141 of file pagelib.php.
$_pagetype = null [protected] |
Definition at line 139 of file pagelib.php.
$_periodicrefreshdelay = null [protected] |
Definition at line 202 of file pagelib.php.
$_popup_notification_allowed = true [protected] |
Definition at line 229 of file pagelib.php.
$_requires = null [protected] |
Definition at line 163 of file pagelib.php.
$_settingsnav = null [protected] |
Definition at line 181 of file pagelib.php.
$_state = self::STATE_BEFORE_HEADER [protected] |
Field declarations =========================================================.
#@-
Definition at line 100 of file pagelib.php.
$_subpage = '' [protected] |
Definition at line 150 of file pagelib.php.
$_theme = null [protected] |
Definition at line 177 of file pagelib.php.
$_title = '' [protected] |
Definition at line 135 of file pagelib.php.
$_url = null [protected] |
Definition at line 157 of file pagelib.php.
$_wherethemewasinitialised = null [protected] |
Definition at line 191 of file pagelib.php.
| const STATE_BEFORE_HEADER = 0 |
#@+ Tracks the where we are in the generation of the page.
Definition at line 92 of file pagelib.php.
| const STATE_DONE = 3 |
Definition at line 95 of file pagelib.php.
| const STATE_IN_BODY = 2 |
Definition at line 94 of file pagelib.php.
| const STATE_PRINTING_HEADER = 1 |
Definition at line 93 of file pagelib.php.