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


The standard implementation of the core_renderer interface.
Definition at line 204 of file outputrenderers.php.
| __construct | ( | moodle_page $ | page, |
| $ | target | ||
| ) |
Constructor
| moodle_page | $page | the page we are doing output for. |
| string | $target | one of rendering target constants |
Reimplemented from renderer_base.
Definition at line 228 of file outputrenderers.php.
| action_icon | ( | $ | url, |
| pix_icon $ | pixicon, | ||
| component_action $ | action = null, |
||
| array $ | attributes = null, |
||
| $ | linktext = false |
||
| ) |
Similar to action_link, image is used instead of the text
| string | moodle_url | $url | A string URL or moodel_url |
| pix_icon | $pixicon | |
| component_action | $action | |
| array | $attributes | associative array of html link attributes + disabled |
| bool | $linktext | show title next to image in link |
Definition at line 1049 of file outputrenderers.php.

| action_link | ( | $ | url, |
| $ | text, | ||
| component_action $ | action = null, |
||
| array $ | attributes = null |
||
| ) |
Renders a special html link with attached action
| string | moodle_url | $url | |
| string | $text | HTML fragment |
| component_action | $action | |
| array | $attributes | associative array of html link attributes + disabled |
Definition at line 990 of file outputrenderers.php.


| block | ( | block_contents $ | bc, |
| $ | region | ||
| ) |
Prints a nice side block with an optional header.
The content is described by a block_contents object.
| block_contents | $bc | HTML for the content |
| string | $region | the region the block is appearing in. |
Reimplemented in theme_mymobile_core_renderer.
Definition at line 806 of file outputrenderers.php.


| block_annotation | ( | block_contents $ | bc | ) | [protected] |
Produces the annotation for a block
| block_contents | $bc |
Definition at line 902 of file outputrenderers.php.


| block_content | ( | block_contents $ | bc | ) | [protected] |
Produces the content area for a block
| block_contents | $bc |
Definition at line 870 of file outputrenderers.php.


| block_controls | ( | $ | controls | ) |
Output the row of editing icons for a block, as defined by the controls array.
| array | $controls | an array like block_contents::$controls. |
Definition at line 772 of file outputrenderers.php.


| block_footer | ( | block_contents $ | bc | ) | [protected] |
Produces the footer for a block
| block_contents | $bc |
Definition at line 888 of file outputrenderers.php.


| block_header | ( | block_contents $ | bc | ) | [protected] |
Produces a header for a block
| block_contents | $bc |
Reimplemented in theme_mymobile_core_renderer.
Definition at line 848 of file outputrenderers.php.


| block_move_target | ( | $ | target | ) |
Output a place where the block that is currently being moved can be dropped.
| block_move_target | $target | with the necessary details. |
Definition at line 977 of file outputrenderers.php.


| blocks_for_region | ( | $ | region | ) |
Output all the blocks in a particular region.
| string | $region | the name of a region on this page. |
Reimplemented in theme_mymobile_core_renderer.
Definition at line 956 of file outputrenderers.php.

| box | ( | $ | contents, |
| $ | classes = 'generalbox', |
||
| $ | id = null |
||
| ) |
Outputs a box.
| string | $contents | The contents of the box |
| string | $classes | A space-separated list of CSS classes |
| string | $id | An optional ID |
Definition at line 2214 of file outputrenderers.php.


| box_end | ( | ) |
Outputs the closing section of a box.
Definition at line 2234 of file outputrenderers.php.

| box_start | ( | $ | classes = 'generalbox', |
| $ | id = null |
||
| ) |
Outputs the opening section of a box.
| string | $classes | A space-separated list of CSS classes |
| string | $id | An optional ID |
Definition at line 2224 of file outputrenderers.php.


| close_window_button | ( | $ | text = '' | ) |
Prints a simple button to close a window
| string | $text | The lang string for the button's label (already output from get_string()) |
Definition at line 1989 of file outputrenderers.php.

| confirm | ( | $ | message, |
| $ | continue, | ||
| $ | cancel | ||
| ) |
Print a message along with button choices for Continue/Cancel
If a string or moodle_url is given instead of a single_button, method defaults to post.
| string | $message | The question to ask the user |
| single_button | moodle_url | string | $continue | The single_button component representing the Continue answer. Can also be a moodle_url or string URL |
| single_button | moodle_url | string | $cancel | The single_button component representing the Cancel answer. Can also be a moodle_url or string URL |
Definition at line 1081 of file outputrenderers.php.

| container | ( | $ | contents, |
| $ | classes = null, |
||
| $ | id = null |
||
| ) |
Outputs a container.
| string | $contents | The contents of the box |
| string | $classes | A space-separated list of CSS classes |
| string | $id | An optional ID |
Definition at line 2245 of file outputrenderers.php.


| container_end | ( | ) |
Outputs the closing section of a container.
Definition at line 2265 of file outputrenderers.php.

| container_end_all | ( | $ | shouldbenone = false | ) |
Close all but the last open container. This is useful in places like error handling, where you want to close all the open containers (apart from <body>) before outputting the error message.
| bool | $shouldbenone | assert that the stack should be empty now - causes a developer debug warning if it isn't. |
Definition at line 734 of file outputrenderers.php.

| container_start | ( | $ | classes = null, |
| $ | id = null |
||
| ) |
Outputs the opening section of a container.
| string | $classes | A space-separated list of CSS classes |
| string | $id | An optional ID |
Definition at line 2255 of file outputrenderers.php.


| continue_button | ( | $ | url | ) |
Print a continue button that goes to a particular URL.
| string | moodle_url | $url | The url the button goes to. |
Definition at line 2120 of file outputrenderers.php.


| custom_menu | ( | ) |
Returns the custom menu if one has been set
A custom menu can be configured by browsing to Settings: Administration > Appearance > Themes > Theme settings and then configuring the custommenu config setting as described.
Definition at line 2438 of file outputrenderers.php.

| doc_link | ( | $ | path, |
| $ | text = '' |
||
| ) |
Returns a string containing a link to the user documentation. Also contains an icon by default. Shown to teachers and admin only.
| string | $path | The page link after doc root and language, no leading slash. |
| string | $text | The text to be displayed for the link |
Definition at line 1398 of file outputrenderers.php.

| doctype | ( | ) |
Get the DOCTYPE declaration that should be used with this page. Designed to be called in theme layout.php files.
Definition at line 243 of file outputrenderers.php.

| edit_button | ( | moodle_url $ | url | ) |
Prints a "Turn editing on/off" button in a form.
| moodle_url | $url | The URL + params to send through when clicking the button |
Definition at line 1969 of file outputrenderers.php.

| error_text | ( | $ | message | ) |
Output an error message. By default wraps the error message in . If the error message is blank, nothing is output.
| string | $message | the error message. |
Definition at line 2005 of file outputrenderers.php.

| fatal_error | ( | $ | message, |
| $ | moreinfourl, | ||
| $ | link, | ||
| $ | backtrace, | ||
| $ | debuginfo = null |
||
| ) |
Do not call this function directly.
To terminate the current script with a fatal error, call the print_error function, or throw an exception. Doing either of those things will then call this function to display the error, before terminating the execution.
| string | $message | The message to output |
| string | $moreinfourl | URL where more info can be found about the error |
| string | $link | Link for the Continue button |
| array | $backtrace | The execution backtrace |
| string | $debuginfo | Debugging information |
Reimplemented in core_renderer_ajax, and core_renderer_cli.
Definition at line 2026 of file outputrenderers.php.

| file_picker | ( | $ | options | ) |
Print the file picker
$OUTPUT->file_picker($options);
| array | $options | associative array with file manager options options are: maxbytes=>-1, itemid=>0, client_id=>uniqid(), acepted_types=>'*', return_types=>FILE_INTERNAL, context=>$PAGE->context |
Definition at line 1889 of file outputrenderers.php.

| footer | ( | ) |
Outputs the page's footer
Reimplemented in core_renderer_ajax.
Definition at line 695 of file outputrenderers.php.


| string used in link header | ( | ) |
Start output by sending the HTTP headers, and printing the HTML <head> and the start of the <body>.
To control what is printed, you should set properties on $PAGE. If you are familiar with the old print_header() function from Moodle 1.9 you will find that there are properties on $PAGE that correspond to most of the old parameters to could be passed to print_header.
Not that, in due course, the remaining $navigation, $menu parameters here will be replaced by more properties of $PAGE, but that is still to do.
Do NOT use, please use <?php echo $OUTPUT->main_content() ?> in layout files instead.
Reimplemented in core_renderer_ajax, core_renderer_cli, and theme_mymobile_core_renderer.
Definition at line 625 of file outputrenderers.php.


| heading | ( | $ | text, |
| $ | level = 2, |
||
| $ | classes = 'main', |
||
| $ | id = null |
||
| ) |
Outputs a heading
| string | $text | The text of the heading |
| int | $level | The level of importance of the heading. Defaulting to 2 |
| string | $classes | A space-separated list of CSS classes |
| string | $id | An optional ID |
Reimplemented in core_renderer_ajax, core_renderer_cli, and theme_mymobile_core_renderer.
Definition at line 2199 of file outputrenderers.php.


| heading_with_help | ( | $ | text, |
| $ | helpidentifier, | ||
| $ | component = 'moodle', |
||
| $ | icon = '', |
||
| $ | iconalt = '' |
||
| ) |
| help_icon | ( | $ | identifier, |
| $ | component = 'moodle', |
||
| $ | linktext = '' |
||
| ) |
Print a help icon.
| string | $identifier | The keyword that defines a help page |
| string | $component | component name |
| string | bool | $linktext | true means use $title as link text, string means link text value |
Definition at line 1639 of file outputrenderers.php.


| help_icon_scale | ( | $ | courseid, |
| stdClass $ | scale | ||
| ) |
Print scale help icon.
| int | $courseid | |
| object | $scale | instance |
Definition at line 1702 of file outputrenderers.php.


| home_link | ( | ) |
Return the 'back' link that normally appears in the footer.
Definition at line 527 of file outputrenderers.php.

| htmlattributes | ( | ) |
The attributes that should be added to the <html> tag. Designed to be called in theme layout.php files.
Definition at line 276 of file outputrenderers.php.

| htmllize_file_tree | ( | $ | dir | ) |
Internal implementation of file tree viewer items rendering.
| array | $dir |
Definition at line 1856 of file outputrenderers.php.
| init_block_hider_js | ( | block_contents $ | bc | ) | [protected] |
Calls the JS require function to hide a block.
| block_contents | $bc | A block_contents object |
Reimplemented in theme_mymobile_core_renderer.
Definition at line 915 of file outputrenderers.php.


| lang_menu | ( | ) |
Returns lang menu or '', this method also checks forcing of languages in courses.
Definition at line 742 of file outputrenderers.php.

| larrow | ( | ) |
Accessibility: Right arrow-like character is used in the breadcrumb trail, course navigation menu (previous/next activity), calendar, and search forum block. If the theme does not set characters, appropriate defaults are set automatically. Please DO NOT use < > - these are confusing for blind users.
Definition at line 2425 of file outputrenderers.php.
| list_block_contents | ( | $ | icons, |
| $ | items | ||
| ) |
Render the contents of a block_list.
| array | $icons | the icon for each item. |
| array | $items | the content of each item. |
Definition at line 935 of file outputrenderers.php.

| login_info | ( | ) |
Return the standard string that says whether you are logged in (and switched roles/logged in as another user).
Reimplemented in theme_mymobile_core_renderer.
Definition at line 442 of file outputrenderers.php.

| main_content | ( | ) |
Returns standard main content placeholder. Designed to be called in theme layout.php files.
Definition at line 421 of file outputrenderers.php.
| navbar | ( | ) |
Return the navbar content so that it can be echoed out by the layout
Reimplemented in theme_mymobile_core_renderer.
Definition at line 2335 of file outputrenderers.php.

| notification | ( | $ | message, |
| $ | classes = 'notifyproblem' |
||
| ) |
Output a notification (that is, a status message about something that has just happened).
| string | $message | the message to print out |
| string | $classes | normally 'notifyproblem' or 'notifysuccess'. |
Reimplemented in core_renderer_ajax, core_renderer_cli, and theme_mymobile_core_renderer.
Definition at line 2110 of file outputrenderers.php.


| old_help_icon | ( | $ | helpidentifier, |
| $ | title, | ||
| $ | component = 'moodle', |
||
| $ | linktext = '' |
||
| ) |
Print a help icon.
| string | $page | The keyword that defines a help page |
| string | $title | A descriptive text for accessibility only |
| string | $component | component name |
| string | bool | $linktext | true means use $title as link text, string means link text value |
Definition at line 1577 of file outputrenderers.php.

| paging_bar | ( | $ | totalcount, |
| $ | page, | ||
| $ | perpage, | ||
| $ | baseurl, | ||
| $ | pagevar = 'page' |
||
| ) |
Prints a single paging bar to provide access to other pages (usually in a search)
| int | $totalcount | The total number of entries available to be paged through |
| int | $page | The page you are currently viewing |
| int | $perpage | The number of entries that should be shown per page |
| string | moodle_url | $baseurl | url of the current page, the $pagevar parameter is added |
| string | $pagevar | name of page parameter that holds the page number |
Definition at line 2140 of file outputrenderers.php.

Render icon
| string | $pix | short pix name |
| string | $alt | mandatory alt attribute |
| string | $component | standard compoennt name like 'moodle', 'mod_forum', etc. |
| array | $attributes | htm lattributes |
Definition at line 1421 of file outputrenderers.php.


| rarrow | ( | ) |
Accessibility: Right arrow-like character is used in the breadcrumb trail, course navigation menu (previous/next activity), calendar, and search forum block. If the theme does not set characters, appropriate defaults are set automatically. Please DO NOT use < > - these are confusing for blind users.
Definition at line 2412 of file outputrenderers.php.
| redirect_message | ( | $ | encodedurl, |
| $ | message, | ||
| $ | delay, | ||
| $ | debugdisableredirect | ||
| ) |
Redirects the user by any means possible given the current state
This function should not be called directly, it should always be called using the redirect function in lib/weblib.php
The redirect function should really only be called before page output has started however it will allow itself to be called during the state STATE_IN_BODY
| string | $encodedurl | The URL to send to encoded if required |
| string | $message | The message to display to the user if any |
| int | $delay | The delay before redirecting a user, if $message has been set this is a requirement and defaults to 3, set to 0 no delay |
| boolean | $debugdisableredirect | this redirect has been disabled for debugging purposes. Display a message that explains, and don't trigger the redirect. |
Reimplemented in core_renderer_ajax, and theme_mymobile_core_renderer.
Definition at line 571 of file outputrenderers.php.

| render_action_link | ( | action_link $ | link | ) | [protected] |
Implementation of action_link rendering
| action_link | $link |
Definition at line 1004 of file outputrenderers.php.

| render_custom_menu | ( | custom_menu $ | menu | ) | [protected] |
Renders a custom menu object (located in outputcomponents.php)
The custom menu this method produces makes use of the YUI3 menunav widget and requires very specific html elements and classes.
int $menucount
| custom_menu | $menu |
Reimplemented in theme_afterburner_core_renderer.
Definition at line 2457 of file outputrenderers.php.


| render_custom_menu_item | ( | custom_menu_item $ | menunode | ) | [protected] |
Renders a custom menu node as part of a submenu
The custom menu this method produces makes use of the YUI3 menunav widget and requires very specific html elements and classes.
int $submenucount
| custom_menu_item | $menunode |
Reimplemented in theme_afterburner_core_renderer.
Definition at line 2498 of file outputrenderers.php.


| render_file_picker | ( | file_picker $ | fp | ) |
Internal implementation of file picker rendering.
| file_picker | $fp |
Definition at line 1898 of file outputrenderers.php.

| render_help_icon | ( | help_icon $ | helpicon | ) | [protected] |
Implementation of user image rendering.
| help_icon | $helpicon |
Reimplemented in theme_mymobile_core_renderer.
Definition at line 1655 of file outputrenderers.php.

| render_navigation_node | ( | navigation_node $ | item | ) | [protected] |
Reimplemented in theme_mymobile_core_renderer, and theme_afterburner_core_renderer.
Definition at line 2360 of file outputrenderers.php.

| render_old_help_icon | ( | old_help_icon $ | helpicon | ) | [protected] |
Implementation of user image rendering.
| help_icon | $helpicon |
Definition at line 1593 of file outputrenderers.php.

| render_page_layout | ( | $ | layoutfile | ) | [protected] |
Renders and outputs the page layout file.
| string | $layoutfile | The name of the layout file |
Definition at line 672 of file outputrenderers.php.

| render_paging_bar | ( | paging_bar $ | pagingbar | ) | [protected] |
Internal implementation of paging bar rendering.
| paging_bar | $pagingbar |
Definition at line 2150 of file outputrenderers.php.

| render_pix_emoticon | ( | pix_emoticon $ | emoticon | ) | [protected] |
Render emoticon
| pix_emoticon | $emoticon |
Definition at line 1442 of file outputrenderers.php.

| render_pix_icon | ( | pix_icon $ | icon | ) | [protected] |
Render icon
| pix_icon | $icon |
Definition at line 1431 of file outputrenderers.php.

| render_rating | ( | rating $ | rating | ) |
Produces the html that represents this rating in the UI
| $page | the page object on which this rating will appear |
Definition at line 1452 of file outputrenderers.php.

| render_single_button | ( | single_button $ | button | ) | [protected] |
Internal implementation of single_button rendering
| single_button | $button |
Reimplemented in theme_mymobile_core_renderer.
Definition at line 1138 of file outputrenderers.php.

| render_single_select | ( | single_select $ | select | ) | [protected] |
Internal implementation of single_select rendering
| single_select | $select |
Reimplemented in theme_mymobile_core_renderer.
Definition at line 1209 of file outputrenderers.php.

| render_url_select | ( | url_select $ | select | ) | [protected] |
Internal implementation of url_select rendering
| single_select | $select |
Definition at line 1290 of file outputrenderers.php.

| render_user_picture | ( | user_picture $ | userpicture | ) | [protected] |
Internal implementation of user image rendering.
| user_picture | $userpicture |
Definition at line 1787 of file outputrenderers.php.

| single_button | ( | $ | url, |
| $ | label, | ||
| $ | method = 'post', |
||
| array $ | options = null |
||
| ) |
Returns a form with a single button.
| string | moodle_url | $url | |
| string | $label | button text |
| string | $method | get or post submit method |
| array | $options | associative array {disabled, title, etc.} |
Definition at line 1118 of file outputrenderers.php.


| single_select | ( | $ | url, |
| $ | name, | ||
| array $ | options, | ||
| $ | selected = '', |
||
| $ | nothing = array(''=>'choosedots'), |
||
| $ | formid = null |
||
| ) |
Returns a form with a single select widget.
| moodle_url | $url | form action target, includes hidden fields |
| string | $name | name of selection field - the changing parameter in url |
| array | $options | list of options |
| string | $selected | selected element |
| array | $nothing | |
| string | $formid |
Definition at line 1195 of file outputrenderers.php.


| skip_link_target | ( | $ | id = null | ) |
Output the place a skip link goes to.
| string | $id | The target name from the corresponding $PAGE->requires->skip_link_to($target) call. |
Definition at line 2187 of file outputrenderers.php.


Creates and returns a spacer image with optional line break.
| array | $attributes | |
| boo | spacer |
Definition at line 1724 of file outputrenderers.php.

The standard tags (typically script tags that are not needed earlier) that should be output after everything else, . Designed to be called in theme layout.php files.
Definition at line 430 of file outputrenderers.php.
The standard tags (typically performance information and validation links, if we are in developer debug mode) that should be output in the footer area of the page. Designed to be called in theme layout.php files.
Definition at line 374 of file outputrenderers.php.

The standard tags (meta tags, links to stylesheets and JavaScript, etc.) that should be included in the <head> tag. Designed to be called in theme layout.php files.
Definition at line 286 of file outputrenderers.php.

The standard tags (typically skip links) that should be output just inside the start of the <body> tag. Designed to be called in theme layout.php files.
Definition at line 359 of file outputrenderers.php.
| theme_switch_links | ( | ) | [protected] |
Renders theme links for switching between default and other themes.
Definition at line 2541 of file outputrenderers.php.


| tree_block_contents | ( | $ | items, |
| $ | attrs = array() |
||
| ) |
Make nested HTML lists out of the items
The resulting list will look something like this:
<
<>
<
>
<> <> <> <>
| array[]tree_item | $items |
| array[string]string | $attrs html attributes passed to the top of the list |
Definition at line 2289 of file outputrenderers.php.

| update_module_button | ( | $ | cmid, |
| $ | modulename | ||
| ) |
Prints the 'Update this Modulename' button that appears on module pages.
| string | $cmid | the course_module id. |
| string | $modulename | the module name, eg. "forum", "quiz" or "workshop" |
Definition at line 1952 of file outputrenderers.php.

| url_select | ( | array $ | urls, |
| $ | selected, | ||
| $ | nothing = array(''=>'choosedots'), |
||
| $ | formid = null |
||
| ) |
Returns a form with a url select widget.
| array | $urls | list of urls - array('/course/view.php?id=1'=>'Frontpage', ....) |
| string | $selected | selected element |
| array | $nothing | |
| string | $formid |
Definition at line 1280 of file outputrenderers.php.

| user_picture | ( | stdClass $ | user, |
| array $ | options = null |
||
| ) |
Print the specified user's avatar.
User avatar may be obtained in two ways:
// Option 1: (shortcut for simple cases, preferred way) // $user has come from the DB and has fields id, picture, imagealt, firstname and lastname $OUTPUT->user_picture($user, array('popup'=>true));
// Option 2: $userpic = new user_picture($user); // Set properties of $userpic $userpic->popup = true; $OUTPUT->render($userpic);
| object | Object with at least fields id, picture, imagealt, firstname, lastname If any of these are missing, the database is queried. Avoid this if at all possible, particularly for reports. It is very bad for performance. | |
| array | $options | associative array with user picture options, used only if not a user_picture object, options are:
|
Definition at line 1772 of file outputrenderers.php.

$contenttype [protected] |
Definition at line 213 of file outputrenderers.php.
$metarefreshtag = '' [protected] |
Definition at line 215 of file outputrenderers.php.
$unique_end_html_token [protected] |
Definition at line 217 of file outputrenderers.php.
$unique_main_content_token [protected] |
Definition at line 221 of file outputrenderers.php.
$unique_performance_info_token [protected] |
Definition at line 219 of file outputrenderers.php.
| const MAIN_CONTENT_TOKEN = '[MAIN CONTENT GOES HERE]' |
Definition at line 211 of file outputrenderers.php.