wCMF
3.6
|
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 | |
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.
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 43 of file class.DefaultControlRenderer.php.
DefaultControlRenderer::getMaxFileSize | ( | ) |
Get the maximum file size for uploads. Returns the value given in config key 'maxFileSize' in section 'htmlform', default: 200000
Definition at line 55 of file class.DefaultControlRenderer.php.
References InifileParser\getInstance().
Referenced by configure_file(), and configure_fileex().
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)
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 |
Definition at line 80 of file class.DefaultControlRenderer.php.
References $view, InifileParser\getInstance(), and WCMFException\throwEx().
DefaultControlRenderer::configure_select | ( | & | $view | ) |
Set additional parameters to the select view
view | A reference to the control view |
Definition at line 130 of file class.DefaultControlRenderer.php.
References $view, and Obfuscator\getInstance().
DefaultControlRenderer::configure_file | ( | & | $view | ) |
Set additional parameters to the file control view
view | A reference to the control view |
Definition at line 159 of file class.DefaultControlRenderer.php.
References $view, and getMaxFileSize().
DefaultControlRenderer::configure_fileex | ( | & | $view | ) |
Set additional parameters to the fileex control view
view | A reference to the control view |
Definition at line 167 of file class.DefaultControlRenderer.php.
References $view, FormUtil\getInputFieldDelimiter(), InifileParser\getInstance(), and getMaxFileSize().
DefaultControlRenderer::configure_filebrowser | ( | & | $view | ) |
Set additional parameters to the filebrowser view
view | A 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
view | A reference to the control view |
Definition at line 188 of file class.DefaultControlRenderer.php.
References $view, and InternalLink\isLink().
DefaultControlRenderer::configure_fckeditor | ( | & | $view | ) |
Set additional parameters to the fckeditor view
view | A reference to the control view |
Definition at line 202 of file class.DefaultControlRenderer.php.
References $view, InifileParser\getInstance(), and WCMFException\throwEx().
DefaultControlRenderer::configure_color | ( | & | $view | ) |
Set additional parameters to the color view
view | A reference to the control view |
Definition at line 223 of file class.DefaultControlRenderer.php.
References $view, InifileParser\getInstance(), and WCMFException\throwEx().
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.
DefaultControlRenderer::$view = null |
Definition at line 48 of file class.DefaultControlRenderer.php.
Referenced by configure_color(), configure_fckeditor(), configure_file(), configure_filebrowser(), configure_fileex(), configure_linkbrowser(), configure_select(), and renderControl().