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

Public Member Functions

 __construct (theme_config $theme)

Protected Member Functions

 get_target_suffix ($target)
 standard_renderer_classname ($component, $subtype=null)

Protected Attributes

 $theme

Detailed Description

This is a base class to help you implement the renderer_factory interface.

It keeps a cache of renderers that have been constructed, so you only need to construct each one once in you subclass.

It also has a method to get the name of, and include the renderer.php with the definition of, the standard renderer class for a given module.

Since:
Moodle 2.0

Definition at line 108 of file outputfactories.php.


Constructor & Destructor Documentation

__construct ( theme_config theme)

Constructor.

Parameters:
theme_config$themethe theme we belong to.

Reimplemented in theme_overridden_renderer_factory.

Definition at line 116 of file outputfactories.php.


Member Function Documentation

get_target_suffix ( target) [protected]

Returns suffix of renderer class expected for given target.

Parameters:
string$targetone of the renderer target constants, target is guessed if null used
Returns:
array two element array, first element is target, second the target suffix string

Definition at line 125 of file outputfactories.php.

Here is the caller graph for this function:

standard_renderer_classname ( component,
subtype = null 
) [protected]

For a given module name, return the name of the standard renderer class that defines the renderer interface for that module.

Also, if it exists, include the renderer.php file for that module, so the class definition of the default renderer has been loaded.

Parameters:
string$componentname such as 'core', 'mod_forum' or 'qtype_multichoice'.
string$subtypeoptional subtype such as 'news' resulting to 'mod_forum_news'
Returns:
string the name of the standard renderer class for that module.

Definition at line 157 of file outputfactories.php.

Here is the call graph for this function:

Here is the caller graph for this function:


Field Documentation

$theme [protected]

Definition at line 110 of file outputfactories.php.


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