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

Public Member Functions

 __construct (moodle_page $page, $target)
 render (renderable $widget)
 add_action_handler (component_action $action, $id=null)
 has_started ()
 pix_url ($imagename, $component= 'moodle')

Static Public Member Functions

static prepare_classes ($classes)

Protected Attributes

 $opencontainers
 $page
 $target

Detailed Description

Simple base class for Moodle renderers.

Tracks the xhtml_container_stack to use, which is passed in in the constructor.

Also has methods to facilitate generating HTML output.

Since:
Moodle 2.0

Definition at line 43 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 in core_renderer, plugin_renderer_base, and core_course_renderer.

Definition at line 56 of file outputrenderers.php.


Member Function Documentation

add_action_handler ( component_action action,
id = null 
)

Adds JS handlers needed for event execution for one html element id

Parameters:
component_action$actions
string$id
Returns:
string id of element, either original submitted or random new if not supplied

Definition at line 81 of file outputrenderers.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Have we started output yet?

Returns:
boolean true if the header has been printed.

Definition at line 93 of file outputrenderers.php.

Here is the caller graph for this function:

pix_url ( imagename,
component = 'moodle' 
)

Return the moodle_url for an image. The exact image location and extension is determined automatically by searching for gif|png|jpg|jpeg, please note there can not be diferent images with the different extension. The imagename is for historical reasons a relative path name, it may be changed later for core images. It is recommended to not use subdirectories in plugin and theme pix directories.

There are three types of images: 1/ theme images - stored in theme/mytheme/pix/, use component 'theme' 2/ core images - stored in /pix/, overridden via theme/mytheme/pix_core/ 3/ plugin images - stored in mod/mymodule/pix, overridden via theme/mytheme/pix_plugins/mod/mymodule/, example: pix_url('comment', 'mod_glossary')

Parameters:
string$imagenamethe pathname of the image
string$componentfull plugin name (aka component) or 'theme'
Returns:
moodle_url

Definition at line 132 of file outputrenderers.php.

Here is the caller graph for this function:

static prepare_classes ( classes) [static]

Given an array or space-separated list of classes, prepares and returns the HTML class attribute value

Parameters:
mixed$classesSpace-separated string or array of classes
Returns:
string HTML class attribute value

Definition at line 102 of file outputrenderers.php.

Here is the caller graph for this function:

render ( renderable widget)

Returns rendered widget.

Parameters:
renderable$widgetinstance with renderable interface
Returns:
string

Reimplemented in plugin_renderer_base.

Definition at line 67 of file outputrenderers.php.

Here is the caller graph for this function:


Field Documentation

$opencontainers [protected]

Definition at line 45 of file outputrenderers.php.

$page [protected]

Definition at line 47 of file outputrenderers.php.

$target [protected]

Definition at line 49 of file outputrenderers.php.


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