wCMF
3.6
|
Public Member Functions | |
renderValue ($type, $value, $attributes) | |
configure_image (&$view) | |
configure_text (&$view) | |
Public Attributes | |
$view = null | |
DefaultValueRenderer is responsible for rendering (Node) values of a given display type. Each display type is defined in a smarty template, which is configured by the appropriate entry in the configuration section 'htmldisplay' (e.g. the image display type has the entry 'image'). The templates get a default set of variables assigned. Additional variables, needed only for certain display types, are assigned in the appropriate configure method (e.g. 'configure_image') which may be overridden by subclasses.
wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH
Licensed under the terms of any of the following licenses at your choice:
See the license.txt file distributed with this work for additional information.
New controls may be defined by defining the template, putting it into the configuration section 'htmlform' and maybe implementing a configure method in a subclass of DefaultControlRenderer. If a subclass is needed, the key 'ControlRenderer' in the configuration section 'implementation' must point to it (don't forget to give the class definition in the 'classmapping' section).
Definition at line 41 of file class.DefaultValueRenderer.php.
DefaultValueRenderer::renderValue | ( | $type, | |
$value, | |||
$attributes | |||
) |
Render a value of given type using the appropriate smarty template (defined in the config section 'htmldisplay'). The given parameters will be passed to the view. If additional parameters are needed an configure method must be implemented (name: configure_type)
type | The display type of the value (the template is selected based on the type) |
value | The value to display |
attributes | An attribute string to be placed in the html tag (defining its appearance) |
Definition at line 54 of file class.DefaultValueRenderer.php.
References $view, InifileParser\getInstance(), and WCMFException\throwEx().
DefaultValueRenderer::configure_image | ( | & | $view | ) |
Set additional parameters to the image html representation
view | A reference to the html view |
Definition at line 99 of file class.DefaultValueRenderer.php.
References $view.
DefaultValueRenderer::configure_text | ( | & | $view | ) |
Set additional parameters to the text html representation
view | A reference to the html view |
Definition at line 117 of file class.DefaultValueRenderer.php.
DefaultValueRenderer::$view = null |
Definition at line 43 of file class.DefaultValueRenderer.php.
Referenced by configure_image(), and renderValue().