wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
DefaultValueRenderer Class Reference

Public Member Functions

 renderValue ($type, $value, $attributes)
 
 configure_image (&$view)
 
 configure_text (&$view)
 

Public Attributes

 $view = null
 

Detailed Description

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.

Id:
class.DefaultValueRenderer.php 1462 2014-02-04 23:52:27Z iherwig

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).

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 41 of file class.DefaultValueRenderer.php.

Member Function Documentation

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)

Parameters
typeThe display type of the value (the template is selected based on the type)
valueThe value to display
attributesAn attribute string to be placed in the html tag (defining its appearance)
Returns
The HMTL representation of the value

Definition at line 54 of file class.DefaultValueRenderer.php.

References $view, InifileParser\getInstance(), and WCMFException\throwEx().

+ Here is the call graph for this function:

DefaultValueRenderer::configure_image ( $view)

Set additional parameters to the image html representation

Parameters
viewA 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

Parameters
viewA reference to the html view

Definition at line 117 of file class.DefaultValueRenderer.php.

Member Data Documentation

DefaultValueRenderer::$view = null

Definition at line 43 of file class.DefaultValueRenderer.php.

Referenced by configure_image(), and renderValue().


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