Returns all categories IDs who has used by this type of object (ie : this field)
static array(interger
getAllUsedCategoriesForField
([mixed $restrictToItemsIds = false])
-
mixed
$restrictToItemsIds: (boolean or array) $restrictToItemsIds, restrict results to given items ids. False to restrict to only used categories (default)
Return a list of all objects names of given type
static array(integer
getListOfNamesForObject
([boolean $public = false], [ $searchConditions = array()], [ $restrictToUsedCat = true], array $searchConditions,)
-
boolean
$public: are the needed datas public ? /!\ Does not apply for this type of object
-
array
$searchConditions,: search conditions to add. /!\ Does not apply for this type of object
-
$searchConditions
-
$restrictToUsedCat
Return sub tree of a given category
string
categoriesTree
(array $values, multidimentionnal $tags)
-
array
$values: : parameters values array(parameterName => parameterValue) in : root : the category id to get subtree. If none set, use the defined root category for field maxlevel : the maximum number of level to get (optional) selected : the current selected category id (optional) usedcategories : display only used categories (optional, default : true)
-
multidimentionnal
$tags: array $tags : xml2Array content of atm-function tag <item>...{lvl}...{id}...{label}...{sublevel}...</item> <itemselected>...{lvl}...{id}...{label}...{sublevel}...</itemselected> <template>...{sublevel}...</template>
Return a given category lineage
string
category
(array $values, multidimentionnal $tags)
-
array
$values: : parameters values array(parameterName => parameterValue) in : category : the category id
-
multidimentionnal
$tags: array $tags : xml2Array content of atm-function tag ... {id} ... {label} ...
Return a given category lineage
string
categoryLineage
(array $values, multidimentionnal $tags)
-
array
$values: : parameters values array(parameterName => parameterValue) in : category : the category id to get lineage of
-
multidimentionnal
$tags: array $tags : xml2Array content of atm-function tag <ancestor> ... {id} ... {label} ... </ancestor> <self> ... {label} ...</self>
check object Mandatories Values
boolean
checkMandatory
(array $values, string $prefixName)
-
array
$values: : the POST result values
-
string
$prefixName: prefixname : the prefix used for post names
Redefinition of:
- CMS_object_common::checkMandatory()
- check object Mandatories Values
Returns each category ID and label in a module given user can see
array(string)
getAllCategoriesAsArray
([
$language =
false], [
$restrictToUsedCat =
false], [
$module =
false], [
mixed $clearanceLevel =
false], [
$categoriesRoot =
false], [
$strict =
false], [
$usedByItemsIds =
false], [
mixed $crossLanguage =
false],
CMS_language $cms_language,,
boolean $restrictToUsedCat,,
string $cms_module,,
boolean $editableOnly,,
mixed $categoriesRoot,,
boolean $strict,)
-
CMS_language
$cms_language,: the language of the labels
-
boolean
$restrictToUsedCat,: restrict returned categories to used ones only (default false)
-
string
$cms_module,: the module codename (optional)
-
boolean
$editableOnly,: return only user editable categories (default false : viewvable ones)
-
mixed
$clearanceLevel: - false : CLEARANCE_MODULE_VIEW
- true : CLEARANCE_MODULE_EDIT
- constant value : clearanceLevel value
-
mixed
$categoriesRoot,: root category ID to use (default : false : the field root category)
-
boolean
$strict,: return strict categories available for user for this field (without the parent tree). default false
-
mixed
$crossLanguage: (boolean or array) $usedByItemsIds, This parameters is used only if $restrictToUsedCat is used. False to restrict to only used categories (default)
-
$language
-
$restrictToUsedCat
-
$module
-
$categoriesRoot
-
$strict
-
$usedByItemsIds
Get field order SQL request (used by class CMS_object_search)
string
getFieldOrderSQL
(integer $fieldID, mixed $direction, string $operator, string $where, [boolean $public = false])
-
integer
$fieldID: : this field id in object (aka $this->_field->getID())
-
mixed
$direction: : the direction to search (asc/desc)
-
string
$operator: : additionnal search operator
-
string
$where: : where clauses to add to SQL
-
boolean
$public: : values are public or edited ? (default is edited)
Redefinition of:
- CMS_object_common::getFieldOrderSQL()
- Get field order SQL request (used by class CMS_object_search)
Get field search SQL request (used by class CMS_object_search)
string
getFieldSearchSQL
(integer $fieldID, integer $value, string $operator, string $where, [boolean $public = false])
-
integer
$fieldID: : this field id in object (aka $this->_field->getID())
-
integer
$value: : the category value to search
-
string
$operator: : additionnal search operator
-
string
$where: : where clauses to add to SQL
-
boolean
$public: : values are public or edited ? (default is edited)
Redefinition of:
- CMS_object_common::getFieldSearchSQL()
- Get field search SQL request (used by class CMS_object_search)
get HTML admin (used to enter object values in admin)
string
getHTMLAdmin
(
$fieldID,
$language,
string $prefixName,
integer $fieldID,,
CMS_language $language,)
-
integer
$fieldID,: the current field id (only for poly object compatibility)
-
CMS_language
$language,: the current admin language
-
string
$prefixName: prefixname : the prefix to use for post names
-
$fieldID
-
$language
Redefinition of:
- CMS_object_common::getHTMLAdmin()
- get HTML admin (used to enter object values in admin)
get object HTML description for admin search detail. Usually, the label.
string
getHTMLDescription
()
Redefinition of:
- CMS_object_common::getHTMLDescription()
- get object HTML description for admin search detail. Usually, the label.
get HTML admin subfields parameters (used to enter object categories parameters values in admin)
string
getHTMLSubFieldsParametersCategories
( $language, $prefixName, $parameter)
-
$language
-
$prefixName
-
$parameter
Return the needed form field tag for current object field
string
getInput
( $fieldID, multidimentionnal $language, $inputParams, array $values)
-
array
$values: : parameters values array(parameterName => parameterValue) in : id : the form field id to set
-
multidimentionnal
$language: array $tags : xml2Array content of atm-function tag
-
$fieldID
-
$inputParams
Redefinition of:
- CMS_object_common::getInput()
- Return the needed form field tag for current object field
get labels for object structure and functions
array
getLabelsStructure
( &$language, $objectName)
Redefinition of:
- CMS_object_common::getLabelsStructure()
- get labels for object structure and functions
get object values structure available with getValue method
multidimentionnal
getStructure
()
Redefinition of:
- CMS_object_common::getStructure()
- get object values structure available with getValue method
get an object value
multidimentionnal
getValue
(string $name, [string $parameters = ''])
-
string
$name: : the name of the value to get
-
string
$parameters: (optional) : parameters for the value to get
Redefinition of:
- CMS_object_common::getValue()
- get an object value
Treat fields parameters to import
array
importParams
(
array $params,
CMS_language $cms_language,
&$idsRelation,
&$infos,
array $idsRelation,
string $infos)
-
array
$params: The import parameters. array( create => false|true : create missing objects (default : true) update => false|true : update existing objects (default : true) files => false|true : use files from PATH_TMP_FS (default : true) )
-
CMS_language
$cms_language: The CMS_langage to use
-
array
$idsRelation: : Reference : The relations between import datas ids and real imported ids
-
string
$infos: : Reference : The import infos returned
-
&$idsRelation
-
&$infos
Constructor.
initialize object.
void
__construct
([array $datas = array()], CMS_object_field &$field, [boolean $public = false])
-
array
$datas: DB object values : array(integer "subFieldID" => mixed)
-
boolean
$public: values are public or edited ? (default is edited)
-
CMS_object_field
&$field: reference
Redefinition of:
- CMS_object_common::__construct()
- Constructor.
For a given category, return options tag list (for a select tag) of all sub categories
string
selectOptions
(array $values, multidimentionnal $tags)
-
array
$values: : parameters values array(parameterName => parameterValue) in : selected : the category id which is selected (optional) usedcategories : display only used categories (optional, default : true) usedbyitemsids : display only categories used by items list. Accept array of items ids or list of ids (comma separated). Used only if 'usedcategories' is active (optional, default : false) editableonly : display only editable categories (optional, default : false) root : the category id to use as root (optional) crosslanguage : returned categories do not filter by language and return all categories even if current language has no label (default : false)
-
multidimentionnal
$tags: array $tags : xml2Array content of atm-function tag (nothing for this one)
Set subfields definition for current object
boolean
setSubFieldsDefinition
($subFieldsDefinition $subFieldsDefinition)
-
$subFieldsDefinition
$subFieldsDefinition: array(integer "subFieldID" => array("type" => string [integer|string|text|date], "objectID" => integer, "fieldID" => integer, "subFieldID" => integer))
Redefinition of:
- CMS_object_common::setSubFieldsDefinition()
- Set subfields definition for current object
set object Values
boolean
setValues
(array $values, string $prefixName)
-
array
$values: : the POST result values
-
string
$prefixName: prefixname : the prefix used for post names
Redefinition of:
- CMS_object_common::setValues()
- set object Values
Writes all subobjects into persistence (MySQL for now), along with base data.
boolean
writeToPersistence
()
Redefinition of:
- CMS_object_common::writeToPersistence()
- Writes all subobjects into persistence (MySQL for now), along with base data.
void
_createCategoriesTree
( $categories, $itemPattern, $templatePattern, $selectedPattern, [ $maxlevel = 0], [ $selectedID = false])
-
$categories
-
$itemPattern
-
$templatePattern
-
$selectedPattern
-
$maxlevel
-
$selectedID
void
_natecasecomp
( $str1, $str2)
Inherited Methods
Inherited From CMS_object_common
CMS_object_common::__construct()
CMS_object_common::asArray()
CMS_object_common::checkMandatory()
CMS_object_common::getDescription()
CMS_object_common::getFieldDescription()
CMS_object_common::getFieldLabel()
CMS_object_common::getFieldOrderSQL()
CMS_object_common::getFieldSearchSQL()
CMS_object_common::getHTMLAdmin()
CMS_object_common::getHTMLDescription()
CMS_object_common::getHTMLSubFieldsParameters()
CMS_object_common::getInput()
CMS_object_common::getLabel()
CMS_object_common::getLabelsStructure()
CMS_object_common::getObjectLabel()
CMS_object_common::getParamsValues()
CMS_object_common::getParamValue()
CMS_object_common::getSoapValues()
CMS_object_common::getStructure()
CMS_object_common::getSubFieldParameters()
CMS_object_common::getSubFieldsDefinition()
CMS_object_common::getValue()
CMS_object_common::hasParameters()
CMS_object_common::serializeHTMLParameters()
CMS_object_common::setParamValue()
CMS_object_common::setSoapValues()
CMS_object_common::setSubFieldsDefinition()
CMS_object_common::setValues()
CMS_object_common::treatParams()
CMS_object_common::writeToPersistence()
Inherited From CMS_grandFather
CMS_grandFather::autoload()
CMS_grandFather::hasError()
CMS_grandFather::log()
CMS_grandFather::PHPErrorHandler()
CMS_grandFather::raiseError()
CMS_grandFather::setDebug()
CMS_grandFather::setLog()
CMS_grandFather::_raiseError()
CMS_grandFather::__call()