contenido\classes\contenido\class.module.php
Description: Area management class
Requirements:
- Author
- Timo Hummel
- 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 created 2003-02-26 modified 2010-08-17, Munkh-Ulzii Balidar, - changed SQL query in method moduleInUse - added new property aUsedTemplates and saved the information of used templates - added new method getUsedTemplates $Id: class.module.php 1199 2010-08-24 14:31:44Z timo.trautmann $: }}
- Package
- Contenido Backend classes
- Version
- 1.15
Functions
cHandler_ItemArea( $sName, $aAttribs, $sContent) : void| Name | Type | Description |
|---|---|---|
| $sName | ||
| $aAttribs | ||
| $sContent |
cHandler_ItemData( $sName, $aAttribs, $sContent) : void| Name | Type | Description |
|---|---|---|
| $sName | ||
| $aAttribs | ||
| $sContent |
cHandler_ItemName( $sName, $aAttribs, $sContent) : void| Name | Type | Description |
|---|---|---|
| $sName | ||
| $aAttribs | ||
| $sContent |
cHandler_ModuleData( $sName, $aAttribs, $sContent) : void| Name | Type | Description |
|---|---|---|
| $sName | ||
| $aAttribs | ||
| $sContent |
\cApiModule
- Parent(s)
- \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

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

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

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

array $values- Type
- array
- Access
- private
- Inherited_from
- \Item::$$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
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()| 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()| Name | Type | Description |
|---|---|---|
| $data | mixed | Data to filter |
| Type | Description |
|---|---|
| mixed | Filtered data |
- Access
- private
- See
- \setFilters

_parseImportFile(string $sFile, $sType = "module", $sEncoding = "ISO-8859-1") : void_parseImportFile Parse import xml file, stores data in global variable (-> event handler functions)
@access private
| Name | Type | Description |
|---|---|---|
| $sFile | string | Filename including path of import xml file @param string $sType Import type, "module" or "package" @return bool Returns true, if file has been parsed |
| $sType | ||
| $sEncoding |

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

cApiModule( $loaditem = false) : voidConstructor Function
| Name | Type | Description |
|---|---|---|
| $loaditem | Item to load |

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

export( $filename, $return = false) : voidexport Exports the specified module strings to a file
| Name | Type | Description |
|---|---|---|
| $filename | string Filename to return | |
| $return | boolean if false, the result is immediately sent to the browser |

exportPackage(string $sPackageFileName, bool $bReturn = false) : voidexportPackage Exports the specified module and attached files to a file
| Name | Type | Description |
|---|---|---|
| $sPackageFileName | string | Filename to return |
| $bReturn | bool | if false, the result is immediately sent to the browser |

get(string $field) : mixed| 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
| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field to retrieve |
| Type | Description |
|---|---|
| mixed | Value of the field |

getProperty(string $type, string $name) : boolean| Name | Type | Description |
|---|---|---|
| $type | string | Specifies the type |
| $name | string | Specifies the name |
| Type | Description |
|---|---|
| boolean | Value of the given property |

getTranslatedName() : stringgetTranslatedName Returns the translated name of the module if a translation exists.
| Type | Description |
|---|---|
| string | Translated module name or original |

getUsedTemplates() : arrayGet the informations of used templates
| Type | Description |
|---|---|
| array | template data |

import( $sFile) : voidimport Imports the a module from a XML file Uses xmlparser and callbacks
| Name | Type | Description |
|---|---|---|
| $sFile |

importPackage(string $sFile, array $aOptions = array()) : boolimportPackage Imports a module package from a XML file Uses xmlparser and callbacks
| Name | Type | Description |
|---|---|---|
| $sFile | string | Filename of data file (including path) |
| $aOptions | array | Optional. An array of arrays specifying, how the items
of the xml file will be imported. If specified, has to
contain an array of this structure:
$aOptions["items"][ |
| Type | Description |
|---|---|
| bool | Returns true, if import has been successfully finished |

isOldModule() : booleanisOldModule() Checks if the module is a pre-4.3 module
| Type | Description |
|---|---|
| boolean | true if this module is an old one |

loadBy(string $field, string $value, bool $bSafe = true) : boolloadBy ($field, $value) Loads an item by colum/field from the database
Inherited from: \Item::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( $id) : boolloadByPrimaryKey ($value) Loads an item by ID from the database
| Name | Type | Description |
|---|---|---|
| $id |
| Type | Description |
|---|---|
| bool | True if the load was successful |

moduleInUse( $module, $bSetData = false) : boolmoduleInUse() Checks if the module is in use
| Name | Type | Description |
|---|---|---|
| $module | ||
| $bSetData |
| Type | Description |
|---|---|
| bool | Specifies if the module is in use |

parseModuleForStrings() : arrayparseModuleForStrings Parses the module for mi18n strings and returns them in an array
| Type | Description |
|---|---|
| array | Found strings for this module |

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

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

setTranslatedName( $name) : \nonesetTranslatedName Sets the translated name of the module
| Name | Type | Description |
|---|---|---|
| $name | string Translated name of the module |
| Type | Description |
|---|---|
| \none |
\cApiModuleCollection
- Parent(s)
- \ItemCollection
- Author
- Timo A. Hummel
- Copyright
- four for business 2003
- Version
- 0.1
Properties

array $_forwardJoinPartnersForward join partners for this data object
- Type
- array
- Access
- private
- Inherited_from
- \ItemCollection::$$_forwardJoinPartners

array $_groupConditions- Type
- array
- Access
- private
- Inherited_from
- \ItemCollection::$$_groupConditions

array $_innerGroupConditions = array()array()Details- Type
- array
- Access
- private
- Inherited_from
- \ItemCollection::$$_innerGroupConditions

array $_resultFields = array()array()Details- Type
- array
- Access
- private
- Inherited_from
- \ItemCollection::$$_resultFields

array $_whereRestriction- Type
- array
- Access
- private
- Inherited_from
- \ItemCollection::$$_whereRestriction

string $table- Type
- string
- Access
- private
- Inherited_from
- \ItemCollection::$$table
Methods

ItemCollection(string $table, $primaryKey, $lifetime = 10) : voidConstructor Function Note: Default lifetime is 10 seconds.
Inherited from: \ItemCollection::ItemCollection()| Name | Type | Description |
|---|---|---|
| $table | string | The table to use as information source |
| $primaryKey | ||
| $lifetime |

_buildGroupWhereStatements() : arrayBuilds a where statement out of the setGroupWhere calls
| Type | Description |
|---|---|
| array | with all where statements |

_buildWhereStatements() : arrayBuilds a where statement out of the setWhere calls
| Type | Description |
|---|---|
| array | with all where statements |

_fetchJoinTables(\none $ignore_root) : arrayFetches all tables which will be joined later on.
The returned array has the following format:
array( array(fields), array(tables), array(joins), array(wheres) );
Notes: The table is the table name which needs to be added to the FROM clause The join statement which is inserted after the master table The where statement is combined with all other where statements The fields to select from
| Name | Type | Description |
|---|---|---|
| $ignore_root | \none |
| Type | Description |
|---|---|
| array | see above |

_findReverseJoinPartner( $parentclass, $classname) : void| Name | Type | Description |
|---|---|---|
| $parentclass | ||
| $classname |

_initializeDriver( $bForceInit = false) : void_initializeDriver: Initializes the driver to use with GenericDB.
Inherited from: \ItemCollection::_initializeDriver()| Name | Type | Description |
|---|---|---|
| $bForceInit | boolean If true, forces the driver to initialize, even if it already exists. |

_recursiveStructuredFetch( $objects, $array) : void| Name | Type | Description |
|---|---|---|
| $objects | ||
| $array |

_setItemClass(string $classname) : \none_setItemClass: private method to set the accompanying item object.
Inherited from: \ItemCollection::_setItemClass()| Name | Type | Description |
|---|---|---|
| $classname | string | specifies the classname |
| Type | Description |
|---|---|
| \none |

_setJoinPartner(string $foreignCollectionClass) : \none_setJoinPartner: Defines the reverse links for this table.
Inherited from: \ItemCollection::_setJoinPartner()Important: The class specified by $foreignCollectionClass needs to be a collection class and has to exist Define all links in the constructor of your object
| Name | Type | Description |
|---|---|---|
| $foreignCollectionClass | string | Specifies the foreign class to use |
| Type | Description |
|---|---|
| \none |

addResultField( $field) : void| Name | Type | Description |
|---|---|---|
| $field |

deleteWhere( $field, $restriction, $operator = "=") : voiddeleteWhere ($field, $restriction, $operator)
Inherited from: \ItemCollection::deleteWhere()Restricts a query with a where clause
| Name | Type | Description |
|---|---|---|
| $field | ||
| $restriction | ||
| $operator |

deleteWhereGroup( $group, $field, $restriction, $operator = "=") : voiddeleteWhereGroup ($group, $field, $restriction, $operator)
Inherited from: \ItemCollection::deleteWhereGroup()Restricts a query with a where clause, groupable
| Name | Type | Description |
|---|---|---|
| $group | ||
| $field | ||
| $restriction | ||
| $operator |

exists(integer $id) : boolean| Name | Type | Description |
|---|---|---|
| $id | integer | The id to check for |
| Type | Description |
|---|---|
| boolean | true if object exists, false if not |

fetchArray( $key, $fields) : arrayfetchArray() Fetches an array of fields from the database.
Inherited from: \ItemCollection::fetchArray()Example: $i = $object->fetchArray("idartlang", array("idlang", "name"));
could result in: $i[5] = array("idlang" => 5, "name" => "My Article");
Important: If you don't pass an array for fields, the function doesn't create an array.
| Name | Type | Description |
|---|---|---|
| $key | string Name of the field to use for the key | |
| $fields | mixed String or array |
| Type | Description |
|---|---|
| array | Resulting array |

fetchObject( $class) : void| Name | Type | Description |
|---|---|---|
| $class |

fetchTable( $fields = array(), $objects = array()) : void| Name | Type | Description |
|---|---|---|
| $fields | ||
| $objects |

flexSelect(string $distinct = "", string $from = "", string $where = "", string $group_by = "", string $order_by = "", string $limit = "") : arrayflexSelect ($distinct = "", $from = "", $where = "", $group_by = "", $order_by = "", $limit = "") Selects all entries from the database and returns them as DBObject-objects to the user.
Inherited from: \ItemCollection::flexSelect()Objects are loaded using their primary key.
| Name | Type | Description |
|---|---|---|
| $distinct | string | Specifies if distinct will be added to the SQL statement ($distinct !== "" -> DISTINCT) |
| $from | string | Specifies the additional from clause (e.g. "con_news_groups AS groups, con_news_groupmembers AS groupmembers"). |
| $where | string | Specifies the where clause. |
| $group_by | string | Specifies the group by clause. |
| $order_by | string | Specifies the order by clause. |
| $limit | string | Specifies the limit by clause. |
| Type | Description |
|---|---|
| array | Array of DBObject-Objects |
- Author
- HerrB

link( $foreignClass) : voidsets the query to use foreign tables in the resultset
Inherited from: \ItemCollection::link()| Name | Type | Description |
|---|---|---|
| $foreignClass |

loadItem( $vitem) : objectloadItem ($item) Loads a single object from the database.
Inherited from: \ItemCollection::loadItem()Needs to be overridden by the extension class.
| Name | Type | Description |
|---|---|---|
| $vitem |
| Type | Description |
|---|---|
| object | The newly created object |

queryAndFetchStructured(\objects $objects) : arrayfetchStructured Returns an array of arrays
Inherited from: \ItemCollection::queryAndFetchStructured()| Name | Type | Description |
|---|---|---|
| $objects | \objects | array with the correct order of the objects |
| Type | Description |
|---|---|
| array | result |

removeResultField( $field) : void| Name | Type | Description |
|---|---|---|
| $field |

select(string $where = "", string $group_by = "", string $order_by = "", string $limit = "") : arrayselect ($where = "", $group_by = "", $order_by = "", $limit = "") Selects all entries from the database and returns them as DBObject-objects to the user.
Inherited from: \ItemCollection::select()Objects are loaded using their primary key.
| Name | Type | Description |
|---|---|---|
| $where | string | Specifies the where clause. |
| $group_by | string | Specifies the group by clause. |
| $order_by | string | Specifies the order by clause. |
| $limit | string | Specifies the limit by clause. |
| Type | Description |
|---|---|
| array | Array of DBObject-Objects |

setEncoding( $sEncoding) : void| Name | Type | Description |
|---|---|---|
| $sEncoding |

setGroupCondition( $group1, $group2, $condition = "AND") : voidsetGroupCondition ($group1, $group2, $condition)
Inherited from: \ItemCollection::setGroupCondition()Defines how groups are linked to each other
| Name | Type | Description |
|---|---|---|
| $group1 | ||
| $group2 | ||
| $condition |

setInnerGroupCondition( $group, $condition = "AND") : voidsetInnerGroupCondition ($group, $condition)
Inherited from: \ItemCollection::setInnerGroupCondition()Defines how relations in one group are linked each together
| Name | Type | Description |
|---|---|---|
| $group | ||
| $condition |

setLimit( $iRowStart, $iRowCount) : void| Name | Type | Description |
|---|---|---|
| $iRowStart | ||
| $iRowCount |

setOrder( $order) : void| Name | Type | Description |
|---|---|---|
| $order |

setWhere( $field, $restriction, $operator = "=") : voidRestricts a query with a where clause
| Name | Type | Description |
|---|---|---|
| $field | ||
| $restriction | ||
| $operator |

setWhereGroup( $group, $field, $restriction, $operator = "=") : voidsetWhereGroup ($group, $field, $restriction, $operator)
Inherited from: \ItemCollection::setWhereGroup()Restricts a query with a where clause, groupable
| Name | Type | Description |
|---|---|---|
| $group | ||
| $field | ||
| $restriction | ||
| $operator |
\cApiModuleTranslation
- Parent(s)
- \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

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

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

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

array $values- Type
- array
- Access
- private
- Inherited_from
- \Item::$$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
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()| 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()| Name | Type | Description |
|---|---|---|
| $data | mixed | Data to filter |
| Type | Description |
|---|---|
| mixed | Filtered data |
- Access
- private
- See
- \setFilters

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

cApiModuleTranslation( $loaditem = false) : voidConstructor Function
| Name | Type | Description |
|---|---|---|
| $loaditem | Item to load |

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

get(string $field) : mixed| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field to retrieve |
| Type | Description |
|---|---|
| mixed | Value of the field |

getField(string $field) : mixed| Name | Type | Description |
|---|---|---|
| $field | string | Specifies the field to retrieve |
| Type | Description |
|---|---|
| mixed | Value of the field |

getProperty(string $type, string $name) : boolean| 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()| 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()| 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()| 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()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 |

setProperty(string $type, string $name, string $value) : voidsetProperty ($type, $name, $value) Sets a custom property
Inherited from: \Item::setProperty()| Name | Type | Description |
|---|---|---|
| $type | string | Specifies the type |
| $name | string | Specifies the name |
| $value | string | Specifies the value |
\cApiModuleTranslationCollection
- Parent(s)
- \ItemCollection
- Author
- Timo A. Hummel
- Copyright
- four for business 2003
- Version
- 0.1
Properties

array $_forwardJoinPartnersForward join partners for this data object
- Type
- array
- Access
- private
- Inherited_from
- \ItemCollection::$$_forwardJoinPartners

array $_groupConditions- Type
- array
- Access
- private
- Inherited_from
- \ItemCollection::$$_groupConditions

array $_innerGroupConditions = array()array()Details- Type
- array
- Access
- private
- Inherited_from
- \ItemCollection::$$_innerGroupConditions

array $_resultFields = array()array()Details- Type
- array
- Access
- private
- Inherited_from
- \ItemCollection::$$_resultFields

array $_whereRestriction- Type
- array
- Access
- private
- Inherited_from
- \ItemCollection::$$_whereRestriction

string $table- Type
- string
- Access
- private
- Inherited_from
- \ItemCollection::$$table
Methods

ItemCollection(string $table, $primaryKey, $lifetime = 10) : voidConstructor Function Note: Default lifetime is 10 seconds.
Inherited from: \ItemCollection::ItemCollection()| Name | Type | Description |
|---|---|---|
| $table | string | The table to use as information source |
| $primaryKey | ||
| $lifetime |

_buildGroupWhereStatements() : arrayBuilds a where statement out of the setGroupWhere calls
| Type | Description |
|---|---|
| array | with all where statements |

_buildWhereStatements() : arrayBuilds a where statement out of the setWhere calls
| Type | Description |
|---|---|
| array | with all where statements |

_fetchJoinTables(\none $ignore_root) : arrayFetches all tables which will be joined later on.
The returned array has the following format:
array( array(fields), array(tables), array(joins), array(wheres) );
Notes: The table is the table name which needs to be added to the FROM clause The join statement which is inserted after the master table The where statement is combined with all other where statements The fields to select from
| Name | Type | Description |
|---|---|---|
| $ignore_root | \none |
| Type | Description |
|---|---|
| array | see above |

_findReverseJoinPartner( $parentclass, $classname) : void| Name | Type | Description |
|---|---|---|
| $parentclass | ||
| $classname |

_initializeDriver( $bForceInit = false) : void_initializeDriver: Initializes the driver to use with GenericDB.
Inherited from: \ItemCollection::_initializeDriver()| Name | Type | Description |
|---|---|---|
| $bForceInit | boolean If true, forces the driver to initialize, even if it already exists. |

_recursiveStructuredFetch( $objects, $array) : void| Name | Type | Description |
|---|---|---|
| $objects | ||
| $array |

_setItemClass(string $classname) : \none_setItemClass: private method to set the accompanying item object.
Inherited from: \ItemCollection::_setItemClass()| Name | Type | Description |
|---|---|---|
| $classname | string | specifies the classname |
| Type | Description |
|---|---|
| \none |

_setJoinPartner(string $foreignCollectionClass) : \none_setJoinPartner: Defines the reverse links for this table.
Inherited from: \ItemCollection::_setJoinPartner()Important: The class specified by $foreignCollectionClass needs to be a collection class and has to exist Define all links in the constructor of your object
| Name | Type | Description |
|---|---|---|
| $foreignCollectionClass | string | Specifies the foreign class to use |
| Type | Description |
|---|---|
| \none |

addResultField( $field) : void| Name | Type | Description |
|---|---|---|
| $field |

create( $idmod, $idlang, $original, $translation = false) : voidCreates a new module translation item
| Name | Type | Description |
|---|---|---|
| $idmod | ||
| $idlang | ||
| $original | ||
| $translation |

deleteWhere( $field, $restriction, $operator = "=") : voiddeleteWhere ($field, $restriction, $operator)
Inherited from: \ItemCollection::deleteWhere()Restricts a query with a where clause
| Name | Type | Description |
|---|---|---|
| $field | ||
| $restriction | ||
| $operator |

deleteWhereGroup( $group, $field, $restriction, $operator = "=") : voiddeleteWhereGroup ($group, $field, $restriction, $operator)
Inherited from: \ItemCollection::deleteWhereGroup()Restricts a query with a where clause, groupable
| Name | Type | Description |
|---|---|---|
| $group | ||
| $field | ||
| $restriction | ||
| $operator |

exists(integer $id) : boolean| Name | Type | Description |
|---|---|---|
| $id | integer | The id to check for |
| Type | Description |
|---|---|
| boolean | true if object exists, false if not |

export( $idmod, $idlang, $filename, $return = false) : voidexport Exports the specified module strings to a file
| Name | Type | Description |
|---|---|---|
| $idmod | int Module ID | |
| $idlang | int Language ID | |
| $filename | string Filename to return | |
| $return | boolean if false, the result is immediately sent to the browser |

fetchArray( $key, $fields) : arrayfetchArray() Fetches an array of fields from the database.
Inherited from: \ItemCollection::fetchArray()Example: $i = $object->fetchArray("idartlang", array("idlang", "name"));
could result in: $i[5] = array("idlang" => 5, "name" => "My Article");
Important: If you don't pass an array for fields, the function doesn't create an array.
| Name | Type | Description |
|---|---|---|
| $key | string Name of the field to use for the key | |
| $fields | mixed String or array |
| Type | Description |
|---|---|
| array | Resulting array |

fetchObject( $class) : void| Name | Type | Description |
|---|---|---|
| $class |

fetchTable( $fields = array(), $objects = array()) : void| Name | Type | Description |
|---|---|---|
| $fields | ||
| $objects |

fetchTranslation( $module, $lang, $string) : voidfetchTranslation Fetches a translation
| Name | Type | Description |
|---|---|---|
| $module | int Module ID | |
| $lang | int Language ID | |
| $string | string String to lookup |

flexSelect(string $distinct = "", string $from = "", string $where = "", string $group_by = "", string $order_by = "", string $limit = "") : arrayflexSelect ($distinct = "", $from = "", $where = "", $group_by = "", $order_by = "", $limit = "") Selects all entries from the database and returns them as DBObject-objects to the user.
Inherited from: \ItemCollection::flexSelect()Objects are loaded using their primary key.
| Name | Type | Description |
|---|---|---|
| $distinct | string | Specifies if distinct will be added to the SQL statement ($distinct !== "" -> DISTINCT) |
| $from | string | Specifies the additional from clause (e.g. "con_news_groups AS groups, con_news_groupmembers AS groupmembers"). |
| $where | string | Specifies the where clause. |
| $group_by | string | Specifies the group by clause. |
| $order_by | string | Specifies the order by clause. |
| $limit | string | Specifies the limit by clause. |
| Type | Description |
|---|---|
| array | Array of DBObject-Objects |
- Author
- HerrB

link( $foreignClass) : voidsets the query to use foreign tables in the resultset
Inherited from: \ItemCollection::link()| Name | Type | Description |
|---|---|---|
| $foreignClass |

loadItem( $vitem) : objectloadItem ($item) Loads a single object from the database.
Inherited from: \ItemCollection::loadItem()Needs to be overridden by the extension class.
| Name | Type | Description |
|---|---|---|
| $vitem |
| Type | Description |
|---|---|
| object | The newly created object |

queryAndFetchStructured(\objects $objects) : arrayfetchStructured Returns an array of arrays
Inherited from: \ItemCollection::queryAndFetchStructured()| Name | Type | Description |
|---|---|---|
| $objects | \objects | array with the correct order of the objects |
| Type | Description |
|---|---|
| array | result |

removeResultField( $field) : void| Name | Type | Description |
|---|---|---|
| $field |

select(string $where = "", string $group_by = "", string $order_by = "", string $limit = "") : arrayselect ($where = "", $group_by = "", $order_by = "", $limit = "") Selects all entries from the database and returns them as DBObject-objects to the user.
Inherited from: \ItemCollection::select()Objects are loaded using their primary key.
| Name | Type | Description |
|---|---|---|
| $where | string | Specifies the where clause. |
| $group_by | string | Specifies the group by clause. |
| $order_by | string | Specifies the order by clause. |
| $limit | string | Specifies the limit by clause. |
| Type | Description |
|---|---|
| array | Array of DBObject-Objects |

setEncoding( $sEncoding) : void| Name | Type | Description |
|---|---|---|
| $sEncoding |

setGroupCondition( $group1, $group2, $condition = "AND") : voidsetGroupCondition ($group1, $group2, $condition)
Inherited from: \ItemCollection::setGroupCondition()Defines how groups are linked to each other
| Name | Type | Description |
|---|---|---|
| $group1 | ||
| $group2 | ||
| $condition |

setInnerGroupCondition( $group, $condition = "AND") : voidsetInnerGroupCondition ($group, $condition)
Inherited from: \ItemCollection::setInnerGroupCondition()Defines how relations in one group are linked each together
| Name | Type | Description |
|---|---|---|
| $group | ||
| $condition |

setLimit( $iRowStart, $iRowCount) : void| Name | Type | Description |
|---|---|---|
| $iRowStart | ||
| $iRowCount |

setOrder( $order) : void| Name | Type | Description |
|---|---|---|
| $order |

setWhere( $field, $restriction, $operator = "=") : voidRestricts a query with a where clause
| Name | Type | Description |
|---|---|---|
| $field | ||
| $restriction | ||
| $operator |

setWhereGroup( $group, $field, $restriction, $operator = "=") : voidsetWhereGroup ($group, $field, $restriction, $operator)
Inherited from: \ItemCollection::setWhereGroup()Restricts a query with a where clause, groupable
| Name | Type | Description |
|---|---|---|
| $group | ||
| $field | ||
| $restriction | ||
| $operator |