Class CMS_object_categories

Description

Class CMS_object_categories

represent a categories object

Located in /automne/classes/modules/polymod/objects/object_categories.php (line 27)

CMS_grandFather
   |
   --CMS_object_common
      |
      --CMS_object_categories
Class Constant Summary
Method Summary
 static array(interger getAllUsedCategoriesForField ([mixed $restrictToItemsIds = false])
 static array(integer getListOfNamesForObject ([boolean $public = false], [ $searchConditions = array()], [ $restrictToUsedCat = true], array $searchConditions,)
 string categoriesTree (array $values, multidimentionnal $tags)
 string category (array $values, multidimentionnal $tags)
 string categoryLineage (array $values, multidimentionnal $tags)
 boolean checkMandatory (array $values, string $prefixName)
 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,)
 string getFieldOrderSQL (integer $fieldID, mixed $direction, string $operator, string $where, [boolean $public = false])
 string getFieldSearchSQL (integer $fieldID, integer $value, string $operator, string $where, [boolean $public = false])
 string getHTMLAdmin ( $fieldID,  $language, string $prefixName, integer $fieldID,, CMS_language $language,)
 string getHTMLDescription ()
 string getHTMLSubFieldsParametersCategories ( $language,  $prefixName,  $parameter)
 string getInput ( $fieldID, multidimentionnal $language,  $inputParams, array $values)
 array getLabelsStructure ( &$language,  $objectName)
 multidimentionnal getStructure ()
 multidimentionnal getValue (string $name, [string $parameters = ''])
 array importParams (array $params, CMS_language $cms_language,  &$idsRelation,  &$infos, array $idsRelation, string $infos)
 void __construct ([array $datas = array()], CMS_object_field &$field, [boolean $public = false])
 string selectOptions (array $values, multidimentionnal $tags)
 boolean setSubFieldsDefinition ($subFieldsDefinition $subFieldsDefinition)
 boolean setValues (array $values, string $prefixName)
 boolean writeToPersistence ()
 void _createCategoriesTree ( $categories,  $itemPattern,  $templatePattern,  $selectedPattern, [ $maxlevel = 0], [ $selectedID = false])
 void _natecasecomp ( $str1,  $str2)
Methods
static getAllUsedCategoriesForField (line 733)

Returns all categories IDs who has used by this type of object (ie : this field)

  • return: id => integer id) the object ids
  • access: public
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)
static getListOfNamesForObject (line 1785)

Return a list of all objects names of given type

  • return: objectID => string objectName)
  • access: public
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
categoriesTree (line 1289)

Return sub tree of a given category

  • return: : the sub tree of the given category
  • access: public
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>
category (line 1183)

Return a given category lineage

  • return: : the category
  • access: public
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} ...
categoryLineage (line 1223)

Return a given category lineage

  • return: : the category lineage
  • access: public
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>
checkMandatory (line 493)

check object Mandatories Values

  • return: true on success, false on failure
  • access: public
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
getAllCategoriesAsArray (line 649)

Returns each category ID and label in a module given user can see

  • return: the statements or false if profile hasn't any access to any categories
  • access: public
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
getFieldOrderSQL (line 1731)

Get field order SQL request (used by class CMS_object_search)

  • return: : the SQL request
  • access: public
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)
getFieldSearchSQL (line 1523)

Get field search SQL request (used by class CMS_object_search)

  • return: : the SQL request
  • access: public
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)
getHTMLAdmin (line 227)

get HTML admin (used to enter object values in admin)

  • return: : the html admin
  • access: public
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)
getHTMLDescription (line 593)

get object HTML description for admin search detail. Usually, the label.

  • return: : object HTML description
  • access: public
string getHTMLDescription ()

Redefinition of:
CMS_object_common::getHTMLDescription()
get object HTML description for admin search detail. Usually, the label.
getHTMLSubFieldsParametersCategories (line 560)

get HTML admin subfields parameters (used to enter object categories parameters values in admin)

  • return: : the html admin
  • access: public
string getHTMLSubFieldsParametersCategories ( $language,  $prefixName,  $parameter)
  • $language
  • $prefixName
  • $parameter
getInput (line 365)

Return the needed form field tag for current object field

  • return: : the form field HTML tag
  • access: public
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
getLabelsStructure (line 1125)

get labels for object structure and functions

  • return: : the labels of object structure and functions
  • access: public
array getLabelsStructure ( &$language,  $objectName)
  • &$language
  • $objectName

Redefinition of:
CMS_object_common::getLabelsStructure()
get labels for object structure and functions
getStructure (line 887)

get object values structure available with getValue method

  • return: array : the object values structure
  • access: public
multidimentionnal getStructure ()

Redefinition of:
CMS_object_common::getStructure()
get object values structure available with getValue method
getValue (line 924)

get an object value

  • return: array : the object values structure
  • access: public
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
importParams (line 1814)

Treat fields parameters to import

  • return: : the treated parameters
  • access: public
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 __construct (line 179)

Constructor.

initialize object.

  • access: public
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.
selectOptions (line 1446)

For a given category, return options tag list (for a select tag) of all sub categories

  • return: : options tag list
  • access: public
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)
setSubFieldsDefinition (line 544)

Set subfields definition for current object

  • return: true on success, false on failure
  • access: public
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
setValues (line 511)

set object Values

  • return: true on success, false on failure
  • access: public
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
writeToPersistence (line 618)

Writes all subobjects into persistence (MySQL for now), along with base data.

  • return: true on success, false on failure
  • access: public
boolean writeToPersistence ()

Redefinition of:
CMS_object_common::writeToPersistence()
Writes all subobjects into persistence (MySQL for now), along with base data.
_createCategoriesTree (line 1382)
void _createCategoriesTree ( $categories,  $itemPattern,  $templatePattern,  $selectedPattern, [ $maxlevel = 0], [ $selectedID = false])
  • $categories
  • $itemPattern
  • $templatePattern
  • $selectedPattern
  • $maxlevel
  • $selectedID
_natecasecomp (line 481)
void _natecasecomp ( $str1,  $str2)
  • $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()
Class Constants
MESSAGE_CHOOSE_OBJECT = 1132 (line 33)
MESSAGE_EMPTY_OBJECTS_SET = 265 (line 32)

Standard Messages

MESSAGE_OBJECT_CATEGORIES_DESCRIPTION = 167 (line 50)
MESSAGE_OBJECT_CATEGORIES_FIELD_WITHOUT_CATEGORIES = 258 (line 53)
MESSAGE_OBJECT_CATEGORIES_LABEL = 166 (line 49)
MESSAGE_OBJECT_CATEGORIES_PARAMETER_ASSOCIATE_UNUSEDCATS = 361 (line 55)
MESSAGE_OBJECT_CATEGORIES_PARAMETER_ASSOCIATE_UNUSEDCATS_DESCRIPTION = 362 (line 56)
MESSAGE_OBJECT_CATEGORIES_PARAMETER_DEFAULT = 367 (line 57)
MESSAGE_OBJECT_CATEGORIES_PARAMETER_MULTI = 168 (line 51)
MESSAGE_OBJECT_CATEGORIES_PARAMETER_ROOT_CATEGORY = 169 (line 52)
MESSAGE_OBJECT_CATEGORY_ATM_INPUT_OPERATOR_DESCRIPTION_DESCRIPTION = 598 (line 81)
MESSAGE_OBJECT_CATEGORY_ATM_INPUT_OPERATOR_HEIGHT_DESCRIPTION = 594 (line 77)
MESSAGE_OBJECT_CATEGORY_ATM_INPUT_OPERATOR_LEFTTITLE_DESCRIPTION = 596 (line 79)
MESSAGE_OBJECT_CATEGORY_ATM_INPUT_OPERATOR_POSITION_DESCRIPTION = 595 (line 78)
MESSAGE_OBJECT_CATEGORY_ATM_INPUT_OPERATOR_RIGHTTITLE_DESCRIPTION = 597 (line 80)
MESSAGE_OBJECT_CATEGORY_ATM_INPUT_OPERATOR_ROOT_DESCRIPTION = 393 (line 60)
MESSAGE_OBJECT_CATEGORY_ATM_INPUT_OPERATOR_SORT_DESCRIPTION = 592 (line 75)
MESSAGE_OBJECT_CATEGORY_ATM_INPUT_OPERATOR_WIDTH_DESCRIPTION = 593 (line 76)
MESSAGE_OBJECT_CATEGORY_COUNT_DESCRIPTION = 157 (line 39)
MESSAGE_OBJECT_CATEGORY_FILE_DESCRIPTION = 256 (line 45)
MESSAGE_OBJECT_CATEGORY_FUNCTION_CATEGORYLINEAGE_DESCRIPTION = 164 (line 47)
MESSAGE_OBJECT_CATEGORY_FUNCTION_CATEGORYTREE_DESCRIPTION = 163 (line 46)
MESSAGE_OBJECT_CATEGORY_FUNCTION_CATEGORY_DESCRIPTION = 289 (line 54)
MESSAGE_OBJECT_CATEGORY_FUNCTION_SELECTEDOPTIONS_DESCRIPTION = 165 (line 48)
MESSAGE_OBJECT_CATEGORY_ICONHTML_DESCRIPTION = 548 (line 71)
MESSAGE_OBJECT_CATEGORY_ICONPATH_DESCRIPTION = 546 (line 69)
MESSAGE_OBJECT_CATEGORY_IDS_DESCRIPTION = 558 (line 72)
MESSAGE_OBJECT_CATEGORY_ID_DESCRIPTION = 161 (line 44)
MESSAGE_OBJECT_CATEGORY_LABELS_DESCRIPTION = 559 (line 73)
MESSAGE_OBJECT_CATEGORY_LABEL_DESCRIPTION = 386 (line 59)
MESSAGE_OBJECT_CATEGORY_OPERATOR_EDITABLE_ONLY_DESCRIPTION = 428 (line 64)
MESSAGE_OBJECT_CATEGORY_OPERATOR_LABEL_DESCRIPTION = 591 (line 74)
MESSAGE_OBJECT_CATEGORY_OPERATOR_NOT_IN_DESCRIPTION = 429 (line 65)
MESSAGE_OBJECT_CATEGORY_OPERATOR_NOT_IN_STRICT_DESCRIPTION = 430 (line 66)
MESSAGE_OBJECT_CATEGORY_OPERATOR_STRICT_DESCRIPTION = 381 (line 58)
MESSAGE_OBJECT_CATEGORY_START_DESCRIPTION = 156 (line 38)

Polymod Messages

MESSAGE_OBJECT_CATEGORY_VALUESDESCRIPTION_DESCRIPTION = 540 (line 67)
MESSAGE_OBJECT_CATEGORY_VALUESFILE_DESCRIPTION = 257 (line 43)
MESSAGE_OBJECT_CATEGORY_VALUESICONHTML_DESCRIPTION = 547 (line 70)
MESSAGE_OBJECT_CATEGORY_VALUESICONPATH_DESCRIPTION = 545 (line 68)
MESSAGE_OBJECT_CATEGORY_VALUESID_DESCRIPTION = 159 (line 41)
MESSAGE_OBJECT_CATEGORY_VALUESLABEL_DESCRIPTION = 160 (line 42)
MESSAGE_OBJECT_CATEGORY_VALUES_DESCRIPTION = 158 (line 40)
MESSAGE_OBJECT_TEXT_PARAMETER_SELECTBOXES_HEIGHT = 400 (line 62)
MESSAGE_OBJECT_TEXT_PARAMETER_SELECTBOXES_MULTICATS_ONLY = 401 (line 63)
MESSAGE_OBJECT_TEXT_PARAMETER_SELECTBOXES_WIDTH = 399 (line 61)

Inherited Constants

Inherited from CMS_object_common

CMS_object_common::MESSAGE_FIELD_NO
CMS_object_common::MESSAGE_FIELD_YES
CMS_object_common::MESSAGE_OBJECT_COMMON_FIELDID_DESCRIPTION
CMS_object_common::MESSAGE_OBJECT_COMMON_FIELDNAME_DESCRIPTION
CMS_object_common::MESSAGE_OBJECT_COMMON_FIELD_DESC_DESCRIPTION
CMS_object_common::MESSAGE_OBJECT_COMMON_LABEL_DESCRIPTION
CMS_object_common::MESSAGE_OBJECT_COMMON_REQUIRED_DESCRIPTION
CMS_object_common::MESSAGE_OBJECT_COMMON_VALUE_DESCRIPTION
CMS_object_common::MESSAGE_UNKNOWN_OBJECT_DESCRIPTION
CMS_object_common::MESSAGE_UNKNOWN_OBJECT_LABEL

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

Documentation generated on Wed, 15 Feb 2012 15:33:25 +0100 by phpDocumentor 1.4.3