AbstractContentModule Class Reference

Detailed Description

AbstractContentModule is the base class for content module implementations.

Each content module is supposed to be associated with a template file that defines the output.

If output caching is activated, the cache id of the template is calculated from the cacheId of the parent template and the name of the module and an optional "cacheId" plugin parameter that is only necessary, if the same module is used several times in the same parent template.

Definition at line 27 of file AbstractContentModule.php.

Public Member Functions

 initialize (\Smarty_Internal_Template $parentTemplate, array $params)
 
 render ()
 

Protected Member Functions

 getRequiredTemplateVars ()
 
 getTemplateFile ()
 
 assignContent (View $view, array $params)
 

Member Function Documentation

◆ initialize()

initialize ( \Smarty_Internal_Template  $parentTemplate,
array  $params 
)
See also
ContentModule::initialize()

Definition at line 38 of file AbstractContentModule.php.

◆ render()

render ( )
See also
ContentModule::render()

Definition at line 86 of file AbstractContentModule.php.

◆ getRequiredTemplateVars()

getRequiredTemplateVars ( )
abstractprotected

Get the names of the scalar template variables required from the parent template, object variables must be created and assigned in the assignContent() method.

Returns
Array of string

◆ getTemplateFile()

getTemplateFile ( )
abstractprotected

Get the template file name.

Returns
String

◆ assignContent()

assignContent ( View  $view,
array  $params 
)
abstractprotected

Assign the content to the view.

Parameters
$view
$paramsParameter array passed to the module plugin