contenido\classes\widgets\class.widgets.actionbutton.php
Description:
Requirements:
- Author
- Unknown
- Con_php_req
- 5.0
- Copyright
- four for business AG
- License
- http://www.contenido.org/license/LIZENZ.txt
- Link
- http://www.4fb.de
- Link
- {@internal $Id: class.widgets.actionbutton.php 738 2008-08-27 10:21:19Z timo.trautmann $: }}
- Package
- Contenido Backend classes
- Version
- 1.0
Constants
\cApiClickableAction
It provides an image for visual representation. Inherited classes should call the "setNamedAction" operation in their constructors; on-the-fly-implementations should call it directly after creating an object instance.
- Parent(s)
- \cApiAction < \Item
- Children
- \cApiClickableQuestionAction
- Author
- Timo A. Hummel
- Copyright
- four for business 2003
- Version
- 0.1
Properties

array $_arrInFilters = array('urlencode', 'conHtmlSpecialChars', 'addslashes')array('urlencode', 'conHtmlSpecialChars', 'addslashes')Details- Type
- array
- Access
- private
- Inherited_from
- \Item::$$_arrInFilters
- Inherited_from
- \cApiAction::$$_arrInFilters

array $_arrOutFilters = array('stripslashes', 'htmldecode', 'urldecode')array('stripslashes', 'htmldecode', 'urldecode')Details- Type
- array
- Access
- private
- Inherited_from
- \Item::$$_arrOutFilters
- Inherited_from
- \cApiAction::$$_arrOutFilters

$_metaObject- Type
- n/a
- Inherited_from
- \Item::$$_metaObject
- Inherited_from
- \cApiAction::$$_metaObject

$_objectInvalid- Type
- n/a
- Inherited_from
- \cApiAction::$$_objectInvalid

array $cache- Type
- array
- Access
- private
- Inherited_from
- \Item::$$cache
- Inherited_from
- \cApiAction::$$cache

string $lasterror- Type
- string
- Access
- private
- Inherited_from
- \Item::$$lasterror
- Inherited_from
- \cApiAction::$$lasterror

int $lifetime- Type
- int
- Access
- private
- Inherited_from
- \Item::$$lifetime
- Inherited_from
- \cApiAction::$$lifetime

array $modifiedValues- Type
- array
- Access
- private
- Inherited_from
- \Item::$$modifiedValues
- Inherited_from
- \cApiAction::$$modifiedValues

string $oldPrimaryKey- Type
- string
- Access
- private
- Inherited_from
- \Item::$$oldPrimaryKey
- Inherited_from
- \cApiAction::$$oldPrimaryKey

object $primaryKey- Type
- object
- Access
- private
- Inherited_from
- \Item::$$primaryKey
- Inherited_from
- \cApiAction::$$primaryKey

object $properties- Type
- object
- Access
- private
- Inherited_from
- \Item::$$properties
- Inherited_from
- \cApiAction::$$properties

string $table- Type
- string
- Access
- private
- Inherited_from
- \Item::$$table
- Inherited_from
- \cApiAction::$$table

array $values- Type
- array
- Access
- private
- Inherited_from
- \Item::$$values
- Inherited_from
- \cApiAction::$$values

boolean $virginIf true, the object is virgin and no operations on it except load-Functions are allowed.
- Type
- boolean
- Access
- private
- Inherited_from
- \Item::$$virgin
- Inherited_from
- \cApiAction::$$virgin
Methods

Item(string $table = "", string $primaryKey = "", $lifetime = 10) : void| Name | Type | Description |
|---|---|---|
| $table | string | The table to use as information source |
| $primaryKey | string | The primary key to use |
| $lifetime |

_inFilter(mixed $data) : mixedFilters the passed data using the functions defines in the _arrInFilters array.
Inherited from: \Item::_inFilter()\cApiAction::_inFilter()| Name | Type | Description |
|---|---|---|
| $data | mixed | Data to filter |
| Type | Description |
|---|---|
| mixed | Filtered data |
- Access
- private
- See
- \setFilters

_onLoad() : \noneFunction which is called whenever an item is loaded. Inherited classes should override this function if desired.
| Type | Description |
|---|---|
| \none |

_outFilter(mixed $data) : mixedFilters the passed data using the functions defines in the _arrOutFilters array.
Inherited from: \Item::_outFilter()\cApiAction::_outFilter()| Name | Type | Description |
|---|---|---|
| $data | mixed | Data to filter |
| Type | Description |
|---|---|
| mixed | Filtered data |
- Access
- private
- See
- \setFilters

cApiAction(integer $idaction = false) : void| Name | Type | Description |
|---|---|---|
| $idaction | integer | area to load |

deleteProperty(string $type, string $name) : voiddeleteProperty ($type, $name) Deletes a custom property
Inherited from: \Item::deleteProperty()\cApiAction::deleteProperty()| Name | Type | Description |
|---|---|---|
| $type | string | Specifies the type |
| $name | string | Specifies the name |

get(string $field) : mixedget($field) Wrapper for getField (less to type)
Inherited from: \Item::get()\cApiAction::get()| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field to retrieve |
| Type | Description |
|---|---|
| mixed | Value of the field |

getField(string $field) : mixedgetField($field) Gets the value of a specific field
Inherited from: \Item::getField()\cApiAction::getField()| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field to retrieve |
| Type | Description |
|---|---|
| mixed | Value of the field |

getProperty(string $type, string $name) : booleangetProperty ($type, $name) Sets a custom property
Inherited from: \Item::getProperty()\cApiAction::getProperty()| Name | Type | Description |
|---|---|---|
| $type | string | Specifies the type |
| $name | string | Specifies the name |
| Type | Description |
|---|---|
| boolean | Value of the given property |

loadBy(string $field, string $value, bool $bSafe = true) : boolloadBy ($field, $value) Loads an item by colum/field from the database
Inherited from: \Item::loadBy()\cApiAction::loadBy()| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field |
| $value | string | Specifies the value |
| $bSafe | bool | use inFilter or not |
| Type | Description |
|---|---|
| bool | True if the load was successful |

loadByPrimaryKey(string $value) : boolloadByPrimaryKey ($value) Loads an item by ID from the database
Inherited from: \Item::loadByPrimaryKey()\cApiAction::loadByPrimaryKey()| Name | Type | Description |
|---|---|---|
| $value | string | Specifies the primary key value |
| Type | Description |
|---|---|
| bool | True if the load was successful |

set(string $field, string $value, $safe = true) : void| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field to set |
| $value | string | Specifies the value to set |
| $safe |

setField(string $field, string $value, boolean $safe = true) : voidsetField($field, $value) Sets the value of a specific field
Inherited from: \Item::setField()\cApiAction::setField()| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field to set |
| $value | string | Specifies the value to set |
| $safe | boolean | Speficies if we should translate characters |

setFilters(array $arrInFilters = array(), array $arrOutFilters = array()) : voidDefine the filter functions used when data is being stored or retrieved from the database.
Inherited from: \Item::setFilters()\cApiAction::setFilters()Examples:
$obj->setFilters(array('addslashes'), array('stripslashes')); $obj->setFilters(array('htmlencode', 'addslashes'), array('stripslashes', 'htmlencode'));
| Name | Type | Description |
|---|---|---|
| $arrInFilters | array | inFilters array with function names |
| $arrOutFilters | array | outFilters array with function names |

setHelpText(string $helptext) : voidsets the help text for this action.
| Name | Type | Description |
|---|---|---|
| $helptext | string | helptext The helptext to apply |
- Access
- public

setIcon(string $icon) : voidSets the action icon for this action.
| Name | Type | Description |
|---|---|---|
| $icon | string | icon Path to the icon. Relative to the backend, if not passed as absolute path. |
- Access
- public

setNamedAction(string $actionName) : voidSets this class to use a specific action, example "con_makestart".
| Name | Type | Description |
|---|---|---|
| $actionName | string | actionName Name of the action to use. This action must exist in the actions table before using it, otherwise, this method will fail. |
- Access
- public

setProperty(string $type, string $name, string $value) : voidsetProperty ($type, $name, $value) Sets a custom property
Inherited from: \Item::setProperty()\cApiAction::setProperty()| Name | Type | Description |
|---|---|---|
| $type | string | Specifies the type |
| $name | string | Specifies the name |
| $value | string | Specifies the value |

store() : voidstore() Stores the modified user object to the database
Inherited from: \Item::store()\cApiAction::store()\cApiClickableQuestionAction
It provides an image for visual representation. Inherited classes should call the "setNamedAction" operation in their constructors; on-the-fly-implementations should call it directly after creating an object instance.
- Parent(s)
- \cApiClickableAction < \cApiAction < \Item
- Author
- Timo A. Hummel
- Copyright
- four for business 2003
- Version
- 0.1
Properties

array $_arrInFilters = array('urlencode', 'conHtmlSpecialChars', 'addslashes')array('urlencode', 'conHtmlSpecialChars', 'addslashes')Details- Type
- array
- Access
- private
- Inherited_from
- \Item::$$_arrInFilters
- Inherited_from
- \cApiAction::$$_arrInFilters
- Inherited_from
- \cApiClickableAction::$$_arrInFilters

array $_arrOutFilters = array('stripslashes', 'htmldecode', 'urldecode')array('stripslashes', 'htmldecode', 'urldecode')Details- Type
- array
- Access
- private
- Inherited_from
- \Item::$$_arrOutFilters
- Inherited_from
- \cApiAction::$$_arrOutFilters
- Inherited_from
- \cApiClickableAction::$$_arrOutFilters

$_metaObject- Type
- n/a
- Inherited_from
- \Item::$$_metaObject
- Inherited_from
- \cApiAction::$$_metaObject
- Inherited_from
- \cApiClickableAction::$$_metaObject

$_objectInvalid- Type
- n/a
- Inherited_from
- \cApiAction::$$_objectInvalid
- Inherited_from
- \cApiClickableAction::$$_objectInvalid

array $cache- Type
- array
- Access
- private
- Inherited_from
- \Item::$$cache
- Inherited_from
- \cApiAction::$$cache
- Inherited_from
- \cApiClickableAction::$$cache

object $db- Type
- object
- Access
- private
- Inherited_from
- \Item::$$db
- Inherited_from
- \cApiAction::$$db
- Inherited_from
- \cApiClickableAction::$$db

string $lasterror- Type
- string
- Access
- private
- Inherited_from
- \Item::$$lasterror
- Inherited_from
- \cApiAction::$$lasterror
- Inherited_from
- \cApiClickableAction::$$lasterror

int $lifetimeLifetime in seconds
- Type
- int
- Access
- private
- Inherited_from
- \Item::$$lifetime
- Inherited_from
- \cApiAction::$$lifetime
- Inherited_from
- \cApiClickableAction::$$lifetime

array $modifiedValues- Type
- array
- Access
- private
- Inherited_from
- \Item::$$modifiedValues
- Inherited_from
- \cApiAction::$$modifiedValues
- Inherited_from
- \cApiClickableAction::$$modifiedValues

string $oldPrimaryKey- Type
- string
- Access
- private
- Inherited_from
- \Item::$$oldPrimaryKey
- Inherited_from
- \cApiAction::$$oldPrimaryKey
- Inherited_from
- \cApiClickableAction::$$oldPrimaryKey

object $primaryKey- Type
- object
- Access
- private
- Inherited_from
- \Item::$$primaryKey
- Inherited_from
- \cApiAction::$$primaryKey
- Inherited_from
- \cApiClickableAction::$$primaryKey

object $propertiesPropertyCollection object
- Type
- object
- Access
- private
- Inherited_from
- \Item::$$properties
- Inherited_from
- \cApiAction::$$properties
- Inherited_from
- \cApiClickableAction::$$properties

string $table- Type
- string
- Access
- private
- Inherited_from
- \Item::$$table
- Inherited_from
- \cApiAction::$$table
- Inherited_from
- \cApiClickableAction::$$table

array $values- Type
- array
- Access
- private
- Inherited_from
- \Item::$$values
- Inherited_from
- \cApiAction::$$values
- Inherited_from
- \cApiClickableAction::$$values

boolean $virginIf true, the object is virgin and no operations on it except load-Functions are allowed.
- Type
- boolean
- Access
- private
- Inherited_from
- \Item::$$virgin
- Inherited_from
- \cApiAction::$$virgin
- Inherited_from
- \cApiClickableAction::$$virgin
Methods

Item(string $table = "", string $primaryKey = "", $lifetime = 10) : voidConstructor Function
Inherited from: \Item::Item()\cApiAction::Item()\cApiClickableAction::Item()| Name | Type | Description |
|---|---|---|
| $table | string | The table to use as information source |
| $primaryKey | string | The primary key to use |
| $lifetime |

_inFilter(mixed $data) : mixedFilters the passed data using the functions defines in the _arrInFilters array.
Inherited from: \Item::_inFilter()\cApiAction::_inFilter()\cApiClickableAction::_inFilter()| Name | Type | Description |
|---|---|---|
| $data | mixed | Data to filter |
| Type | Description |
|---|---|
| mixed | Filtered data |
- Access
- private
- See
- \setFilters

_onLoad() : \none_onLoad ()
Inherited from: \Item::_onLoad()\cApiAction::_onLoad()\cApiClickableAction::_onLoad()Function which is called whenever an item is loaded. Inherited classes should override this function if desired.
| Type | Description |
|---|---|
| \none |

_outFilter(mixed $data) : mixedFilters the passed data using the functions defines in the _arrOutFilters array.
Inherited from: \Item::_outFilter()\cApiAction::_outFilter()\cApiClickableAction::_outFilter()| Name | Type | Description |
|---|---|---|
| $data | mixed | Data to filter |
| Type | Description |
|---|---|
| mixed | Filtered data |
- Access
- private
- See
- \setFilters

_setMetaObject( $objectname) : void| Name | Type | Description |
|---|---|---|
| $objectname |

cApiAction(integer $idaction = false) : void| Name | Type | Description |
|---|---|---|
| $idaction | integer | area to load |

deleteProperty(string $type, string $name) : voiddeleteProperty ($type, $name) Deletes a custom property
Inherited from: \Item::deleteProperty()\cApiAction::deleteProperty()\cApiClickableAction::deleteProperty()| Name | Type | Description |
|---|---|---|
| $type | string | Specifies the type |
| $name | string | Specifies the name |

get(string $field) : mixedget($field) Wrapper for getField (less to type)
Inherited from: \Item::get()\cApiAction::get()\cApiClickableAction::get()| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field to retrieve |
| Type | Description |
|---|---|
| mixed | Value of the field |

getField(string $field) : mixedgetField($field) Gets the value of a specific field
Inherited from: \Item::getField()\cApiAction::getField()\cApiClickableAction::getField()| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field to retrieve |
| Type | Description |
|---|---|
| mixed | Value of the field |

getMetaObject() : void
getProperty(string $type, string $name) : booleangetProperty ($type, $name) Sets a custom property
Inherited from: \Item::getProperty()\cApiAction::getProperty()\cApiClickableAction::getProperty()| Name | Type | Description |
|---|---|---|
| $type | string | Specifies the type |
| $name | string | Specifies the name |
| Type | Description |
|---|---|
| boolean | Value of the given property |

loadBy(string $field, string $value, bool $bSafe = true) : boolloadBy ($field, $value) Loads an item by colum/field from the database
Inherited from: \Item::loadBy()\cApiAction::loadBy()\cApiClickableAction::loadBy()| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field |
| $value | string | Specifies the value |
| $bSafe | bool | use inFilter or not |
| Type | Description |
|---|---|
| bool | True if the load was successful |

loadByPrimaryKey(string $value) : boolloadByPrimaryKey ($value) Loads an item by ID from the database
Inherited from: \Item::loadByPrimaryKey()\cApiAction::loadByPrimaryKey()\cApiClickableAction::loadByPrimaryKey()| Name | Type | Description |
|---|---|---|
| $value | string | Specifies the primary key value |
| Type | Description |
|---|---|
| bool | True if the load was successful |

process( $parameters) : void| Name | Type | Description |
|---|---|---|
| $parameters |

set(string $field, string $value, $safe = true) : voidset($field, $value) Shortcut to setField
Inherited from: \Item::set()\cApiAction::set()\cApiClickableAction::set()| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field to set |
| $value | string | Specifies the value to set |
| $safe |

setField(string $field, string $value, boolean $safe = true) : voidsetField($field, $value) Sets the value of a specific field
Inherited from: \Item::setField()\cApiAction::setField()\cApiClickableAction::setField()| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field to set |
| $value | string | Specifies the value to set |
| $safe | boolean | Speficies if we should translate characters |

setFilters(array $arrInFilters = array(), array $arrOutFilters = array()) : voidDefine the filter functions used when data is being stored or retrieved from the database.
Inherited from: \Item::setFilters()\cApiAction::setFilters()\cApiClickableAction::setFilters()Examples:
$obj->setFilters(array('addslashes'), array('stripslashes')); $obj->setFilters(array('htmlencode', 'addslashes'), array('stripslashes', 'htmlencode'));
| Name | Type | Description |
|---|---|---|
| $arrInFilters | array | inFilters array with function names |
| $arrOutFilters | array | outFilters array with function names |

setHelpText(string $helptext) : void| Name | Type | Description |
|---|---|---|
| $helptext | string | helptext The helptext to apply |
- Access
- public

setIcon(string $icon) : void| Name | Type | Description |
|---|---|---|
| $icon | string | icon Path to the icon. Relative to the backend, if not passed as absolute path. |
- Access
- public

setNamedAction(string $actionName) : voidSets this class to use a specific action, example "con_makestart".
Inherited from: \cApiClickableAction::setNamedAction()| Name | Type | Description |
|---|---|---|
| $actionName | string | actionName Name of the action to use. This action must exist in the actions table before using it, otherwise, this method will fail. |
- Access
- public

setParameter( $name, $value) : void| Name | Type | Description |
|---|---|---|
| $name | ||
| $value |

setProperty(string $type, string $name, string $value) : voidsetProperty ($type, $name, $value) Sets a custom property
Inherited from: \Item::setProperty()\cApiAction::setProperty()\cApiClickableAction::setProperty()| Name | Type | Description |
|---|---|---|
| $type | string | Specifies the type |
| $name | string | Specifies the name |
| $value | string | Specifies the value |

store() : voidstore() Stores the modified user object to the database
Inherited from: \Item::store()\cApiAction::store()\cApiClickableAction::store()
wantParameter( $parameter) : void| Name | Type | Description |
|---|---|---|
| $parameter |