wcmf logo wemove logo

DefaultControlRenderer Class Reference
[Presentation]

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


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)

Data Fields

 $FCKeditorCodeAdded = 0
 $resourceBrowserCodeAdded = 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-2009 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 929 2009-02-22 23:20:49Z 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@wemove.com>

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


Member Function Documentation

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 54 of file class.DefaultControlRenderer.php.

References InifileParser::getInstance().

Referenced by configure_file(), and configure_fileex().

Here is the call graph for this function:

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:
type The type of the input control (the template is selected based on the type)
enabled Indicates wether the input control should be enabled or not
name The name of the input control (usually the name attribute in the control tag)
value The value to display (this may be an array if multiple values are possible e.g. select control)
error The input validation error if existing
attributes An attribute string to be placed in the input control tag (defining its appearance)
listMap An assoziative array defining the possible values for list controls (e.g. select control) see FormUtil::getListMap
inputType The original control definition string
Returns:
The HMTL definition string of the input control

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

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

Here is the call graph for this function:

configure_select ( &$  view  ) 

Set additional parameters to the select view

Parameters:
view A reference to the control view

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

References $view, and Obfuscator::getInstance().

Here is the call graph for this function:

configure_file ( &$  view  ) 

Set additional parameters to the file control view

Parameters:
view A reference to the control view

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

References $view, and getMaxFileSize().

Here is the call graph for this function:

configure_fileex ( &$  view  ) 

Set additional parameters to the fileex control view

Parameters:
view A reference to the control view

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

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

Here is the call graph for this function:

configure_filebrowser ( &$  view  ) 

Set additional parameters to the filebrowser view

Parameters:
view A reference to the control view

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

References $view.

configure_linkbrowser ( &$  view  ) 

Set additional parameters to the linkbrowser view

Parameters:
view A reference to the control view

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

References $view, and InternalLink::isLink().

Here is the call graph for this function:

configure_fckeditor ( &$  view  ) 

Set additional parameters to the fckeditor view

Parameters:
view A reference to the control view

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

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

Here is the call graph for this function:


Field Documentation

$FCKeditorCodeAdded = 0

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

$resourceBrowserCodeAdded = 0

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

$view = null


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

This page generated via doxygen 1.5.8 Mon Mar 30 01:58:43 2009.
Copyright © 2009 wemove digital solutions GmbH.
sourceforge logo