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

Public Member Functions

 __construct (moodle_page $page, $target)
 doctype ()
 htmlattributes ()
 standard_head_html ()
 standard_top_of_body_html ()
 standard_footer_html ()
 main_content ()
 standard_end_of_body_html ()
 login_info ()
 home_link ()
 redirect_message ($encodedurl, $message, $delay, $debugdisableredirect)
 header ()
 footer ()
 container_end_all ($shouldbenone=false)
 lang_menu ()
 block_controls ($controls)
 block (block_contents $bc, $region)
 list_block_contents ($icons, $items)
 blocks_for_region ($region)
 block_move_target ($target)
 action_link ($url, $text, component_action $action=null, array $attributes=null)
 action_icon ($url, pix_icon $pixicon, component_action $action=null, array $attributes=null, $linktext=false)
 confirm ($message, $continue, $cancel)
 single_button ($url, $label, $method='post', array $options=null)
 single_select ($url, $name, array $options, $selected='', $nothing=array(''=>'choosedots'), $formid=null)
 url_select (array $urls, $selected, $nothing=array(''=>'choosedots'), $formid=null)
 doc_link ($path, $text= '')
 pix_icon ($pix, $alt, $component='moodle', array $attributes=null)
 render_rating (rating $rating)
 heading_with_help ($text, $helpidentifier, $component='moodle', $icon='', $iconalt='')
 old_help_icon ($helpidentifier, $title, $component= 'moodle', $linktext= '')
 help_icon ($identifier, $component= 'moodle', $linktext= '')
 help_icon_scale ($courseid, stdClass $scale)
 spacer (array $attributes=null, $br=false)
 user_picture (stdClass $user, array $options=null)
 htmllize_file_tree ($dir)
 file_picker ($options)
 render_file_picker (file_picker $fp)
 update_module_button ($cmid, $modulename)
 edit_button (moodle_url $url)
 close_window_button ($text='')
 error_text ($message)
 fatal_error ($message, $moreinfourl, $link, $backtrace, $debuginfo=null)
 notification ($message, $classes= 'notifyproblem')
 continue_button ($url)
 paging_bar ($totalcount, $page, $perpage, $baseurl, $pagevar= 'page')
 skip_link_target ($id=null)
 heading ($text, $level=2, $classes= 'main', $id=null)
 box ($contents, $classes= 'generalbox', $id=null)
 box_start ($classes= 'generalbox', $id=null)
 box_end ()
 container ($contents, $classes=null, $id=null)
 container_start ($classes=null, $id=null)
 container_end ()
 tree_block_contents ($items, $attrs=array())
 navbar ()
 rarrow ()
 larrow ()
 custom_menu ()

Data Fields

const MAIN_CONTENT_TOKEN = '[MAIN CONTENT GOES HERE]'

Protected Member Functions

 render_page_layout ($layoutfile)
 block_header (block_contents $bc)
 block_content (block_contents $bc)
 block_footer (block_contents $bc)
 block_annotation (block_contents $bc)
 init_block_hider_js (block_contents $bc)
 render_action_link (action_link $link)
 render_single_button (single_button $button)
 render_single_select (single_select $select)
 render_url_select (url_select $select)
 render_pix_icon (pix_icon $icon)
 render_pix_emoticon (pix_emoticon $emoticon)
 render_old_help_icon (old_help_icon $helpicon)
 render_help_icon (help_icon $helpicon)
 render_user_picture (user_picture $userpicture)
 render_paging_bar (paging_bar $pagingbar)
 render_navigation_node (navigation_node $item)
 render_custom_menu (custom_menu $menu)
 render_custom_menu_item (custom_menu_item $menunode)
 theme_switch_links ()

Protected Attributes

 $contenttype
 $metarefreshtag = ''
 $unique_end_html_token
 $unique_performance_info_token
 $unique_main_content_token

Detailed Description

The standard implementation of the core_renderer interface.

Since:
Moodle 2.0

Definition at line 204 of file outputrenderers.php.


Constructor & Destructor Documentation

__construct ( moodle_page page,
target 
)

Constructor

Parameters:
moodle_page$pagethe page we are doing output for.
string$targetone of rendering target constants

Reimplemented from renderer_base.

Definition at line 228 of file outputrenderers.php.


Member Function Documentation

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

Parameters:
string | moodle_url$urlA string URL or moodel_url
pix_icon$pixicon
component_action$action
array$attributesassociative array of html link attributes + disabled
bool$linktextshow title next to image in link
Returns:
string HTML fragment

Definition at line 1049 of file outputrenderers.php.

Here is the call graph for this function:

action_link ( url,
text,
component_action action = null,
array attributes = null 
)

Renders a special html link with attached action

Parameters:
string | moodle_url$url
string$textHTML fragment
component_action$action
array$attributesassociative array of html link attributes + disabled
Returns:
HTML fragment

Definition at line 990 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

block ( block_contents bc,
region 
)

Prints a nice side block with an optional header.

The content is described by a block_contents object.

...CONTENT...

Parameters:
block_contents$bcHTML for the content
string$regionthe region the block is appearing in.
Returns:
string the HTML to be output.

Reimplemented in theme_mymobile_core_renderer.

Definition at line 806 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

block_annotation ( block_contents bc) [protected]

Produces the annotation for a block

Parameters:
block_contents$bc
Returns:
string

Definition at line 902 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

block_content ( block_contents bc) [protected]

Produces the content area for a block

Parameters:
block_contents$bc
Returns:
string

Definition at line 870 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

block_controls ( controls)

Output the row of editing icons for a block, as defined by the controls array.

Parameters:
array$controlsan array like block_contents::$controls.
Returns:
HTML fragment.

Definition at line 772 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

block_footer ( block_contents bc) [protected]

Produces the footer for a block

Parameters:
block_contents$bc
Returns:
string

Definition at line 888 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

block_header ( block_contents bc) [protected]

Produces a header for a block

Parameters:
block_contents$bc
Returns:
string

Reimplemented in theme_mymobile_core_renderer.

Definition at line 848 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

block_move_target ( target)

Output a place where the block that is currently being moved can be dropped.

Parameters:
block_move_target$targetwith the necessary details.
Returns:
string the HTML to be output.

Definition at line 977 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

blocks_for_region ( region)

Output all the blocks in a particular region.

Parameters:
string$regionthe name of a region on this page.
Returns:
string the HTML to be output.

Reimplemented in theme_mymobile_core_renderer.

Definition at line 956 of file outputrenderers.php.

Here is the call graph for this function:

box ( contents,
classes = 'generalbox',
id = null 
)

Outputs a box.

Parameters:
string$contentsThe contents of the box
string$classesA space-separated list of CSS classes
string$idAn optional ID
Returns:
string the HTML to output.

Definition at line 2214 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

box_end ( )

Outputs the closing section of a box.

Returns:
string the HTML to output.

Definition at line 2234 of file outputrenderers.php.

Here is the caller graph for this function:

box_start ( classes = 'generalbox',
id = null 
)

Outputs the opening section of a box.

Parameters:
string$classesA space-separated list of CSS classes
string$idAn optional ID
Returns:
string the HTML to output.

Definition at line 2224 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

close_window_button ( text = '')

Prints a simple button to close a window

Parameters:
string$textThe lang string for the button's label (already output from get_string())
Returns:
string html fragment

Definition at line 1989 of file outputrenderers.php.

Here is the call graph for this function:

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.

Parameters:
string$messageThe question to ask the user
single_button | moodle_url | string$continueThe single_button component representing the Continue answer. Can also be a moodle_url or string URL
single_button | moodle_url | string$cancelThe single_button component representing the Cancel answer. Can also be a moodle_url or string URL
Returns:
string HTML fragment

Definition at line 1081 of file outputrenderers.php.

Here is the call graph for this function:

container ( contents,
classes = null,
id = null 
)

Outputs a container.

Parameters:
string$contentsThe contents of the box
string$classesA space-separated list of CSS classes
string$idAn optional ID
Returns:
string the HTML to output.

Definition at line 2245 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Outputs the closing section of a container.

Returns:
string the HTML to output.

Definition at line 2265 of file outputrenderers.php.

Here is the caller graph for this function:

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.

Parameters:
bool$shouldbenoneassert that the stack should be empty now - causes a developer debug warning if it isn't.
Returns:
string the HTML required to close any open containers inside <body>.

Definition at line 734 of file outputrenderers.php.

Here is the caller graph for this function:

container_start ( classes = null,
id = null 
)

Outputs the opening section of a container.

Parameters:
string$classesA space-separated list of CSS classes
string$idAn optional ID
Returns:
string the HTML to output.

Definition at line 2255 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

continue_button ( url)

Print a continue button that goes to a particular URL.

Parameters:
string | moodle_url$urlThe url the button goes to.
Returns:
string the HTML to output.

Definition at line 2120 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Returns:
string

Definition at line 2438 of file outputrenderers.php.

Here is the call graph for this function:

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.

Parameters:
string$pathThe page link after doc root and language, no leading slash.
string$textThe text to be displayed for the link
Returns:
string

Definition at line 1398 of file outputrenderers.php.

Here is the call graph for this function:

doctype ( )

Get the DOCTYPE declaration that should be used with this page. Designed to be called in theme layout.php files.

Returns:
string the DOCTYPE declaration (and any XML prologue) that should be used.

Definition at line 243 of file outputrenderers.php.

Here is the caller graph for this function:

edit_button ( moodle_url url)

Prints a "Turn editing on/off" button in a form.

Parameters:
moodle_url$urlThe URL + params to send through when clicking the button
Returns:
string HTML the button

Definition at line 1969 of file outputrenderers.php.

Here is the call graph for this function:

error_text ( message)

Output an error message. By default wraps the error message in . If the error message is blank, nothing is output.

Parameters:
string$messagethe error message.
Returns:
string the HTML to output.

Definition at line 2005 of file outputrenderers.php.

Here is the call graph for this function:

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.

Parameters:
string$messageThe message to output
string$moreinfourlURL where more info can be found about the error
string$linkLink for the Continue button
array$backtraceThe execution backtrace
string$debuginfoDebugging information
Returns:
string the HTML to output.

Reimplemented in core_renderer_ajax, and core_renderer_cli.

Definition at line 2026 of file outputrenderers.php.

Here is the call graph for this function:

file_picker ( options)

Print the file picker

 $OUTPUT->file_picker($options);
 
Parameters:
array$optionsassociative array with file manager options options are: maxbytes=>-1, itemid=>0, client_id=>uniqid(), acepted_types=>'*', return_types=>FILE_INTERNAL, context=>$PAGE->context
Returns:
string HTML fragment

Definition at line 1889 of file outputrenderers.php.

Here is the call graph for this function:

footer ( )

Outputs the page's footer

Returns:
string HTML fragment

Reimplemented in core_renderer_ajax.

Definition at line 695 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Returns:
string HTML that you must output this, preferably immediately.

Do NOT use, please use <?php echo $OUTPUT->main_content() ?> in layout files instead.

Deprecated:

Reimplemented in core_renderer_ajax, core_renderer_cli, and theme_mymobile_core_renderer.

Definition at line 625 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

heading ( text,
level = 2,
classes = 'main',
id = null 
)

Outputs a heading

Parameters:
string$textThe text of the heading
int$levelThe level of importance of the heading. Defaulting to 2
string$classesA space-separated list of CSS classes
string$idAn optional ID
Returns:
string the HTML to output.

Reimplemented in core_renderer_ajax, core_renderer_cli, and theme_mymobile_core_renderer.

Definition at line 2199 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

heading_with_help ( text,
helpidentifier,
component = 'moodle',
icon = '',
iconalt = '' 
)

Definition at line 1553 of file outputrenderers.php.

Here is the call graph for this function:

help_icon ( identifier,
component = 'moodle',
linktext = '' 
)

Print a help icon.

Parameters:
string$identifierThe keyword that defines a help page
string$componentcomponent name
string | bool$linktexttrue means use $title as link text, string means link text value
Returns:
string HTML fragment

Definition at line 1639 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

help_icon_scale ( courseid,
stdClass $  scale 
)

Print scale help icon.

Parameters:
int$courseid
object$scaleinstance
Returns:
string HTML fragment

Definition at line 1702 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

home_link ( )

Return the 'back' link that normally appears in the footer.

Returns:
string HTML fragment.

Definition at line 527 of file outputrenderers.php.

Here is the call graph for this function:

The attributes that should be added to the <html> tag. Designed to be called in theme layout.php files.

Returns:
string HTML fragment.

Definition at line 276 of file outputrenderers.php.

Here is the call graph for this function:

htmllize_file_tree ( dir)

Internal implementation of file tree viewer items rendering.

Parameters:
array$dir
Returns:
string

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.

Parameters:
block_contents$bcA block_contents object
Returns:
void

Reimplemented in theme_mymobile_core_renderer.

Definition at line 915 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

lang_menu ( )

Returns lang menu or '', this method also checks forcing of languages in courses.

Returns:
string

Definition at line 742 of file outputrenderers.php.

Here is the call graph for this function:

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.

Returns:
string

Definition at line 2425 of file outputrenderers.php.

list_block_contents ( icons,
items 
)

Render the contents of a block_list.

Parameters:
array$iconsthe icon for each item.
array$itemsthe content of each item.
Returns:
string HTML

Definition at line 935 of file outputrenderers.php.

Here is the call graph for this function:

Return the standard string that says whether you are logged in (and switched roles/logged in as another user).

Returns:
string HTML fragment.

Reimplemented in theme_mymobile_core_renderer.

Definition at line 442 of file outputrenderers.php.

Here is the call graph for this function:

Returns standard main content placeholder. Designed to be called in theme layout.php files.

Returns:
string HTML fragment.

Definition at line 421 of file outputrenderers.php.

navbar ( )

Return the navbar content so that it can be echoed out by the layout

Returns:
string XHTML navbar

Reimplemented in theme_mymobile_core_renderer.

Definition at line 2335 of file outputrenderers.php.

Here is the call graph for this function:

notification ( message,
classes = 'notifyproblem' 
)

Output a notification (that is, a status message about something that has just happened).

Parameters:
string$messagethe message to print out
string$classesnormally 'notifyproblem' or 'notifysuccess'.
Returns:
string the HTML to output.

Reimplemented in core_renderer_ajax, core_renderer_cli, and theme_mymobile_core_renderer.

Definition at line 2110 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

old_help_icon ( helpidentifier,
title,
component = 'moodle',
linktext = '' 
)

Print a help icon.

Deprecated:
since Moodle 2.0
Parameters:
string$pageThe keyword that defines a help page
string$titleA descriptive text for accessibility only
string$componentcomponent name
string | bool$linktexttrue means use $title as link text, string means link text value
Returns:
string HTML fragment

Definition at line 1577 of file outputrenderers.php.

Here is the call graph for this function:

paging_bar ( totalcount,
page,
perpage,
baseurl,
pagevar = 'page' 
)

Prints a single paging bar to provide access to other pages (usually in a search)

Parameters:
int$totalcountThe total number of entries available to be paged through
int$pageThe page you are currently viewing
int$perpageThe number of entries that should be shown per page
string | moodle_url$baseurlurl of the current page, the $pagevar parameter is added
string$pagevarname of page parameter that holds the page number
Returns:
string the HTML to output.

Definition at line 2140 of file outputrenderers.php.

Here is the call graph for this function:

pix_icon ( pix,
alt,
component = 'moodle',
array attributes = null 
)

Render icon

Parameters:
string$pixshort pix name
string$altmandatory alt attribute
string$componentstandard compoennt name like 'moodle', 'mod_forum', etc.
array$attributeshtm lattributes
Returns:
string HTML fragment

Definition at line 1421 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Returns:
string

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

Parameters:
string$encodedurlThe URL to send to encoded if required
string$messageThe message to display to the user if any
int$delayThe delay before redirecting a user, if $message has been set this is a requirement and defaults to 3, set to 0 no delay
boolean$debugdisableredirectthis redirect has been disabled for debugging purposes. Display a message that explains, and don't trigger the redirect.
Returns:
string The HTML to display to the user before dying, may contain meta refresh, javascript refresh, and may have set header redirects

Reimplemented in core_renderer_ajax, and theme_mymobile_core_renderer.

Definition at line 571 of file outputrenderers.php.

Here is the call graph for this function:

render_action_link ( action_link link) [protected]

Implementation of action_link rendering

Parameters:
action_link$link
Returns:
string HTML fragment

Definition at line 1004 of file outputrenderers.php.

Here is the call graph for this function:

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

Parameters:
custom_menu$menu
Returns:
string

Reimplemented in theme_afterburner_core_renderer.

Definition at line 2457 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

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.

See also:
render_custom_menu()

int $submenucount

Parameters:
custom_menu_item$menunode
Returns:
string

Reimplemented in theme_afterburner_core_renderer.

Definition at line 2498 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Internal implementation of file picker rendering.

Parameters:
file_picker$fp
Returns:
string

Definition at line 1898 of file outputrenderers.php.

Here is the call graph for this function:

render_help_icon ( help_icon helpicon) [protected]

Implementation of user image rendering.

Parameters:
help_icon$helpicon
Returns:
string HTML fragment

Reimplemented in theme_mymobile_core_renderer.

Definition at line 1655 of file outputrenderers.php.

Here is the call graph for this function:

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.

Here is the call graph for this function:

render_old_help_icon ( old_help_icon helpicon) [protected]

Implementation of user image rendering.

Parameters:
help_icon$helpicon
Returns:
string HTML fragment

Definition at line 1593 of file outputrenderers.php.

Here is the call graph for this function:

render_page_layout ( layoutfile) [protected]

Renders and outputs the page layout file.

Parameters:
string$layoutfileThe name of the layout file
Returns:
string HTML code

Definition at line 672 of file outputrenderers.php.

Here is the caller graph for this function:

render_paging_bar ( paging_bar pagingbar) [protected]

Internal implementation of paging bar rendering.

Parameters:
paging_bar$pagingbar
Returns:
string

Definition at line 2150 of file outputrenderers.php.

Here is the call graph for this function:

render_pix_emoticon ( pix_emoticon emoticon) [protected]

Render emoticon

Parameters:
pix_emoticon$emoticon
Returns:
string HTML fragment

Definition at line 1442 of file outputrenderers.php.

Here is the call graph for this function:

render_pix_icon ( pix_icon icon) [protected]

Render icon

Parameters:
pix_icon$icon
Returns:
string HTML fragment

Definition at line 1431 of file outputrenderers.php.

Here is the call graph for this function:

render_rating ( rating rating)

Produces the html that represents this rating in the UI

Parameters:
$pagethe page object on which this rating will appear

Definition at line 1452 of file outputrenderers.php.

Here is the call graph for this function:

render_single_button ( single_button button) [protected]

Internal implementation of single_button rendering

Parameters:
single_button$button
Returns:
string HTML fragment

Reimplemented in theme_mymobile_core_renderer.

Definition at line 1138 of file outputrenderers.php.

Here is the call graph for this function:

render_single_select ( single_select select) [protected]

Internal implementation of single_select rendering

Parameters:
single_select$select
Returns:
string HTML fragment

Reimplemented in theme_mymobile_core_renderer.

Definition at line 1209 of file outputrenderers.php.

Here is the call graph for this function:

render_url_select ( url_select select) [protected]

Internal implementation of url_select rendering

Parameters:
single_select$select
Returns:
string HTML fragment

Definition at line 1290 of file outputrenderers.php.

Here is the call graph for this function:

render_user_picture ( user_picture userpicture) [protected]

Internal implementation of user image rendering.

Parameters:
user_picture$userpicture
Returns:
string

Definition at line 1787 of file outputrenderers.php.

Here is the call graph for this function:

single_button ( url,
label,
method = 'post',
array options = null 
)

Returns a form with a single button.

Parameters:
string | moodle_url$url
string$labelbutton text
string$methodget or post submit method
array$optionsassociative array {disabled, title, etc.}
Returns:
string HTML fragment

Definition at line 1118 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

single_select ( url,
name,
array options,
selected = '',
nothing = array(''=>'choosedots'),
formid = null 
)

Returns a form with a single select widget.

Parameters:
moodle_url$urlform action target, includes hidden fields
string$namename of selection field - the changing parameter in url
array$optionslist of options
string$selectedselected element
array$nothing
string$formid
Returns:
string HTML fragment

Definition at line 1195 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

skip_link_target ( id = null)

Output the place a skip link goes to.

Parameters:
string$idThe target name from the corresponding $PAGE->requires->skip_link_to($target) call.
Returns:
string the HTML to output.

Definition at line 2187 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

spacer ( array attributes = null,
br = false 
)

Creates and returns a spacer image with optional line break.

Parameters:
array$attributes
boospacer
Returns:
string HTML fragment

Definition at line 1724 of file outputrenderers.php.

Here is the call graph for this function:

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.

Returns:
string HTML fragment.

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.

Returns:
string HTML fragment.

Definition at line 374 of file outputrenderers.php.

Here is the call graph for this function:

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.

Returns:
string HTML fragment.

Definition at line 286 of file outputrenderers.php.

Here is the call graph for this function:

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.

Returns:
string HTML fragment.

Definition at line 359 of file outputrenderers.php.

theme_switch_links ( ) [protected]

Renders theme links for switching between default and other themes.

Returns:
string

Definition at line 2541 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

tree_block_contents ( items,
attrs = array() 
)

Make nested HTML lists out of the items

The resulting list will look something like this:

 <

<>

(item contents)

<

>

(item contents)

<> <> <> <>

Parameters:
array[]tree_item$items
array[string]string$attrs html attributes passed to the top of the list
Returns:
string HTML

Definition at line 2289 of file outputrenderers.php.

Here is the call graph for this function:

update_module_button ( cmid,
modulename 
)

Prints the 'Update this Modulename' button that appears on module pages.

Parameters:
string$cmidthe course_module id.
string$modulenamethe module name, eg. "forum", "quiz" or "workshop"
Returns:
string the HTML for the button, if this user has permission to edit it, else an empty string.

Definition at line 1952 of file outputrenderers.php.

Here is the call graph for this function:

url_select ( array urls,
selected,
nothing = array(''=>'choosedots'),
formid = null 
)

Returns a form with a url select widget.

Parameters:
array$urlslist of urls - array('/course/view.php?id=1'=>'Frontpage', ....)
string$selectedselected element
array$nothing
string$formid
Returns:
string HTML fragment

Definition at line 1280 of file outputrenderers.php.

Here is the call graph for this function:

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);
 
Parameters:
objectObject 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$optionsassociative array with user picture options, used only if not a user_picture object, options are:
  • courseid=$this->page->course->id (course id of user profile in link)
  • size=35 (size of image)
  • link=true (make image clickable - the link leads to user profile)
  • popup=false (open in popup)
  • alttext=true (add image alt attribute)
  • class = image class attribute (default 'userpicture')
Returns:
string HTML fragment

Definition at line 1772 of file outputrenderers.php.

Here is the call graph for this function:


Field Documentation

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


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