Class CMS_moduleCategory

Description

Class CMS_moduleCategory

Located in /automne/classes/modules/modulecategory.php (line 25)

CMS_grandFather
   |
   --CMS_moduleCategory
Class Constant Summary
Method Summary
 CMS_moduleCategory __construct ([integer $id = 0], [CMS_language $language = false], [CMS_moduleCategory $parentCategory = false], [CMS_moduleCategory $rootCategory = false])
 array asArray ([array $params = array()],  &$files, array $files)
 boolean destroy ()
 boolean fromArray (array $data, array $params, CMS_language $cms_language,  &$idsRelation,  &$infos, array $idsRelation, string $infos)
 string getAttribute (string $name)
 string getDescription ([CMS_language $language = false], [ $useAlternative = true], [ $pluginsCode = true])
 string getFile ([CMS_language $language = false])
 string getFilePath ([mixed $language = false], [boolean $withPath = true], [integer $relativeTo = PATH_RELATIVETO_WEBROOT], [boolean $withFilename = true], string $dataLocation)
 string getIconPath ([boolean $withPath = true], [integer $relativeTo = PATH_RELATIVETO_WEBROOT], [boolean $withFilename = true], string $name, string $dataLocation)
 integer getID ()
 string getLabel ([CMS_language $language = false], [ $useAlternative = true])
 array(CMS_moduleCategory) getLineage ()
 array(integer) getLineageStack ()
 array(CMS_moduleCategory getSiblings ([ $returnObjects = true], boolean $returnObjects,)
 void hasAncestor (integer $category)
 boolean hasParent (CMS_moduleCategory $category)
 void hasRoot (CMS_moduleCategory $category)
 boolean hasSiblings ()
 boolean isProtected ()
 boolean isRoot ()
 void setAttribute (string $name, $value $value)
 void setDescription (string $value, [mixed $language = false])
 void setFile (string $value, [mixed $language = false])
 void setLabel (string $value, [mixed $language = false])
 boolean setProtected (boolean $protected)
 boolean writeToPersistence ()
 void _retrieveLabels ()
Methods
Constructor __construct (line 147)

Constructor

  • access: public
CMS_moduleCategory __construct ([integer $id = 0], [CMS_language $language = false], [CMS_moduleCategory $parentCategory = false], [CMS_moduleCategory $rootCategory = false])
asArray (line 907)

Get object as an array structure used for export

  • return: : the object array structure
  • access: public
array asArray ([array $params = array()],  &$files, array $files)
  • array $params: The export parameters. array( categoriesChildren => false|true : export children categories also (default : true) )
  • array $files: The reference to the founded files used by object
  • &$files
destroy (line 846)

Deletes a category from persistence

Must be called from static method

boolean destroy ()
fromArray (line 969)

Import row from given array datas

  • return: : true on success, false on failure
  • access: public
boolean fromArray (array $data, array $params, CMS_language $cms_language,  &$idsRelation,  &$infos, array $idsRelation, string $infos)
  • array $data: The module datas to import
  • array $params: The import parameters. array( module => false|true : the module to create categories (required) 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
getAttribute (line 207)

Getter for any private attribute on this class

  • access: public
string getAttribute (string $name)
  • string $name
getDescription (line 522)

Access to description

  • access: public
string getDescription ([CMS_language $language = false], [ $useAlternative = true], [ $pluginsCode = true])
getFile (line 582)

Access to a filename

  • access: public
string getFile ([CMS_language $language = false])
getFilePath (line 632)

Access to a filename path

  • access: public
string getFilePath ([mixed $language = false], [boolean $withPath = true], [integer $relativeTo = PATH_RELATIVETO_WEBROOT], [boolean $withFilename = true], string $dataLocation)
  • mixed $language: : CMS_language or language code
  • boolean $withPath: If false, only returns the filename
  • string $dataLocation: Where does the data lies ? See CMS_resource constants
  • integer $relativeTo: Can be web root or filesystem relative, see base constants
  • boolean $withFilename: Should the function return the filename too or only the path ?
getIconPath (line 677)

Get a full path to icon, or icon name only

  • access: public
string getIconPath ([boolean $withPath = true], [integer $relativeTo = PATH_RELATIVETO_WEBROOT], [boolean $withFilename = true], string $name, string $dataLocation)
  • string $name
  • boolean $withPath: If false, only returns the filename
  • string $dataLocation: Where does the data lies ? See CMS_resource constants
  • integer $relativeTo: Can be web root or filesystem relative, see base constants
  • boolean $withFilename: Should the function return the filename too or only the path ?
getID (line 196)

Getter for the ID

  • access: public
integer getID ()
getLabel (line 459)
  • access: public
string getLabel ([CMS_language $language = false], [ $useAlternative = true])
getLineage (line 292)

Builds lineage of categories from lineage stack

  • access: public
array(CMS_moduleCategory) getLineage ()
getLineageStack (line 311)

Stores category lineage IDs in a CMS_stack for rapid access From oldest to itself

  • access: public
array(integer) getLineageStack ()
getParent (line 339)

Get parent category to this one

  • access: public
CMS_moduleCategory getParent ()
getRoot (line 355)

Get root category to this one

  • access: public
CMS_moduleCategory getRoot ()
getSiblings (line 259)

Get all siblings (children) categories returned ordered by order_mca position in db

  • return: or id)
  • access: public
array(CMS_moduleCategory getSiblings ([ $returnObjects = true], boolean $returnObjects,)
  • boolean $returnObjects,: return CMS_moduleCategory on true, or id on false
  • $returnObjects
hasAncestor (line 324)

Test if given categry has the one represented by given id as ancestor

  • access: public
void hasAncestor (integer $category)
  • integer $category: or CMS_moduleCateogry $category, the category to search in lineage
hasParent (line 370)

Test if given categry this one's parent

  • access: public
boolean hasParent (CMS_moduleCategory $category)
hasRoot (line 384)

Test if given categry this one's root

  • access: public
void hasRoot (CMS_moduleCategory $category)
hasSiblings (line 704)

This category contains any sibling ?

  • access: public
boolean hasSiblings ()
isProtected (line 235)

Get the category protected status

  • access: public
boolean isProtected ()
isRoot (line 400)

Test if given categry is a root one

  • access: public
boolean isRoot ()
setAttribute (line 219)

Setter for any private attribute on this class

  • access: public
void setAttribute (string $name, $value $value)
  • string $name: name of attribute to set
  • $value $value: , the value to give
setDescription (line 557)

Sets a new description

  • access: public
void setDescription (string $value, [mixed $language = false])
  • string $value
  • mixed $language: : CMS_language or language code
setFile (line 603)

Sets a file name

  • access: public
void setFile (string $value, [mixed $language = false])
  • string $value
  • mixed $language: : CMS_language or language code
setLabel (line 497)

Sets a new label

  • access: public
void setLabel (string $value, [mixed $language = false])
  • string $value
  • mixed $language: : CMS_language or language code
setProtected (line 246)

Set the category protected status

  • access: public
boolean setProtected (boolean $protected)
  • boolean $protected: The new category protected status
writeToPersistence (line 724)

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

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

Prepare _labels attribute arrays with data from i18NM table

  • access: private
void _retrieveLabels ()

Inherited Methods

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
LINEAGE_PARK_POSITION = 99999 (line 28)
MESSAGE_CATEGORY_DELETED = 1223 (line 27)

Inherited Constants

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

Documentation generated on Wed, 15 Feb 2012 15:32:26 +0100 by phpDocumentor 1.4.3