Stud.IP  4.2 Revision
Renderable.php File Reference

Functions

 getTemplateVariables ($variables=[])
 
 getTemplateLayout ()
 
 getTemplate ($name, array $variables=[])
 
 render (array $variables=[])
 
 __toString ()
 

Variables

trait Renderable
 

Function Documentation

◆ __toString()

__toString ( )

Magic method for converting the object into a string. Invokes the render method of this object.

Returns
string
Here is the call graph for this function:

◆ getTemplate()

getTemplate (   $name,
array  $variables = [] 
)
protected

Returns a template from the defined factory.

Parameters
string$nameTemplate name
array$variablesOptional template variables
Returns
Flexi_Template
Exceptions
Exceptionwhen no factory has been set
Here is the caller graph for this function:

◆ getTemplateLayout()

getTemplateLayout ( )
protected

Returns the layout for this renderable's template. Return null if no layout should be used.

Returns
mixed (Flexi_Template|null)
Here is the caller graph for this function:

◆ getTemplateVariables()

getTemplateVariables (   $variables = [])
abstractprotected

Returns neccessary variables to render the element template.

Parameters
array$variablesOptional additional variables
Returns
array of variables
Here is the caller graph for this function:

◆ render()

render ( array  $variables = [])

Renders this renderable.

Parameters
array$variablesOptional additional variables
Returns
string
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ Renderable

trait Renderable
Initial value:
{
abstract protected function getTemplateName()

Generic trait for renderable objects.

Author
Jan-Hendrik Willms tleil.nosp@m.ax+s.nosp@m.tudip.nosp@m.@gma.nosp@m.il.co.nosp@m.m GPL2 or any later version
Since
Stud.IP 4.1