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

Public Member Functions

 getMaxFileSize ()
 
 renderControl ($type, $enabled, $name, $value, $error, $attributes, $listMap, $inputType)
 
 configure_select (&$view)
 
 configure_file (&$view)
 
 configure_fileex (&$view)
 
 configure_filebrowser (&$view)
 
 configure_linkbrowser (&$view)
 
 configure_fckeditor (&$view)
 
 configure_color (&$view)
 

Public Attributes

 $FCKeditorCodeAdded = 0
 
 $resourceBrowserCodeAdded = 0
 
 $colorCodeAdded = 0
 
 $view = null
 

Detailed Description

DefaultControlRenderer is responsible for rendering html input controls. Each control is defined in a smarty template, which is configured by the appropriate entry in the configuration section 'htmlform' (e.g. the text input control has the entry 'text'). The templates get a default set of variables assigned. Additional variables, needed only for certain controls, are assigned in the appropriate configure method (e.g. 'configure_text'). 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.DefaultControlRenderer.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 43 of file class.DefaultControlRenderer.php.

Member Function Documentation

DefaultControlRenderer::getMaxFileSize ( )

Get the maximum file size for uploads. Returns the value given in config key 'maxFileSize' in section 'htmlform', default: 200000

Returns
The maximum file size in bytes

Definition at line 55 of file class.DefaultControlRenderer.php.

References InifileParser\getInstance().

Referenced by configure_file(), and configure_fileex().

+ Here is the call graph for this function:

DefaultControlRenderer::renderControl (   $type,
  $enabled,
  $name,
  $value,
  $error,
  $attributes,
  $listMap,
  $inputType 
)

Render a HTML control of given type using the appropriate smarty template (defined in the config section 'htmlform'). 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 type of the input control (the template is selected based on the type)
enabledIndicates wether the input control should be enabled or not
nameThe name of the input control (usually the name attribute in the control tag)
valueThe value to display (this may be an array if multiple values are possible e.g. select control)
errorThe input validation error if existing
attributesAn attribute string to be placed in the input control tag (defining its appearance)
listMapAn assoziative array defining the possible values for list controls (e.g. select control) see FormUtil::getListMap
inputTypeThe original control definition string
Returns
The HMTL definition string of the input control

Definition at line 80 of file class.DefaultControlRenderer.php.

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

+ Here is the call graph for this function:

DefaultControlRenderer::configure_select ( $view)

Set additional parameters to the select view

Parameters
viewA reference to the control view

Definition at line 130 of file class.DefaultControlRenderer.php.

References $view, and Obfuscator\getInstance().

+ Here is the call graph for this function:

DefaultControlRenderer::configure_file ( $view)

Set additional parameters to the file control view

Parameters
viewA reference to the control view

Definition at line 159 of file class.DefaultControlRenderer.php.

References $view, and getMaxFileSize().

+ Here is the call graph for this function:

DefaultControlRenderer::configure_fileex ( $view)

Set additional parameters to the fileex control view

Parameters
viewA reference to the control view

Definition at line 167 of file class.DefaultControlRenderer.php.

References $view, FormUtil\getInputFieldDelimiter(), InifileParser\getInstance(), and getMaxFileSize().

+ Here is the call graph for this function:

DefaultControlRenderer::configure_filebrowser ( $view)

Set additional parameters to the filebrowser view

Parameters
viewA reference to the control view

Definition at line 178 of file class.DefaultControlRenderer.php.

References $view.

DefaultControlRenderer::configure_linkbrowser ( $view)

Set additional parameters to the linkbrowser view

Parameters
viewA reference to the control view

Definition at line 188 of file class.DefaultControlRenderer.php.

References $view, and InternalLink\isLink().

+ Here is the call graph for this function:

DefaultControlRenderer::configure_fckeditor ( $view)

Set additional parameters to the fckeditor view

Parameters
viewA reference to the control view

Definition at line 202 of file class.DefaultControlRenderer.php.

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

+ Here is the call graph for this function:

DefaultControlRenderer::configure_color ( $view)

Set additional parameters to the color view

Parameters
viewA reference to the control view

Definition at line 223 of file class.DefaultControlRenderer.php.

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

+ Here is the call graph for this function:

Member Data Documentation

DefaultControlRenderer::$FCKeditorCodeAdded = 0

Definition at line 45 of file class.DefaultControlRenderer.php.

DefaultControlRenderer::$resourceBrowserCodeAdded = 0

Definition at line 46 of file class.DefaultControlRenderer.php.

DefaultControlRenderer::$colorCodeAdded = 0

Definition at line 47 of file class.DefaultControlRenderer.php.


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