Moodle APIs  3.8
Moodle 3.8.6 (Build: 20201109)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
theme_overridden_renderer_factory Class Reference
Inheritance diagram for theme_overridden_renderer_factory:
renderer_factory_base renderer_factory

Public Member Functions

 __construct (theme_config $theme)
 Constructor. More...
 
 get_renderer (moodle_page $page, $component, $subtype=null, $target=null)
 Implement the subclass method. More...
 

Protected Member Functions

 get_target_suffix ($target)
 Returns suffix of renderer class expected for given target. More...
 
 standard_renderer_classnames ($component, $subtype=null)
 For a given module name, return the possible class names that defines the renderer interface for that module. More...
 

Protected Attributes

array $prefixes = array()
 An array of renderer prefixes.
 
theme_config $theme
 The theme we belong to.
 

Constructor & Destructor Documentation

◆ __construct()

theme_overridden_renderer_factory::__construct ( theme_config  $theme)

Constructor.

Parameters
theme_config$themethe theme we are rendering for.

Reimplemented from renderer_factory_base.

Member Function Documentation

◆ get_renderer()

theme_overridden_renderer_factory::get_renderer ( moodle_page  $page,
  $component,
  $subtype = null,
  $target = null 
)

Implement the subclass method.

Parameters
moodle_page$pagethe page the renderer is outputting content for.
string$componentname such as 'core', 'mod_forum' or 'qtype_multichoice'.
string$subtypeoptional subtype such as 'news' resulting to 'mod_forum_news'
string$targetone of rendering target constants
Return values
renderer_basean object implementing the requested renderer interface.

Implements renderer_factory.

◆ get_target_suffix()

renderer_factory_base::get_target_suffix (   $target)
protectedinherited

Returns suffix of renderer class expected for given target.

Parameters
string$targetone of the renderer target constants, target is guessed if null used
Return values
arraytwo element array, first element is target, second the target suffix string

◆ standard_renderer_classnames()

renderer_factory_base::standard_renderer_classnames (   $component,
  $subtype = null 
)
protectedinherited

For a given module name, return the possible class names that defines the renderer interface for that module.

Newer auto-loaded class names are returned as well as the old style _renderable classnames.

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\output\news_renderer' or '\mod_forum\output\news\renderer' or non-autoloaded 'mod_forum_news'
Return values
array[]Each element of the array is an array with keys: classname - The class name to search autoloaded - Does this classname assume autoloading? validwithprefix - Is this class name valid when a prefix is added to it? validwithoutprefix - Is this class name valid when no prefix is added to it?
Exceptions
coding_exception

The documentation for this class was generated from the following file: