Get object as an array structure used for export
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
Deletes a category from persistence
Must be called from static method
boolean
destroy
()
Import row from given array datas
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
Getter for any private attribute on this class
string
getAttribute
(string $name)
Access to description
string
getDescription
([
CMS_language $language =
false], [
$useAlternative =
true], [
$pluginsCode =
true])
Access to a filename path
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 ?
Get a full path to icon, or icon name only
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 ?
Getter for the ID
integer
getID
()
string
getLabel
([
CMS_language $language =
false], [
$useAlternative =
true])
Builds lineage of categories from lineage stack
array(CMS_moduleCategory)
getLineage
()
Stores category lineage IDs in a CMS_stack for rapid access From oldest to itself
array(integer)
getLineageStack
()
Get parent category to this one
Get root category to this one
Get all siblings (children) categories returned ordered by order_mca position in db
array(CMS_moduleCategory
getSiblings
([ $returnObjects = true], boolean $returnObjects,)
-
boolean
$returnObjects,: return CMS_moduleCategory on true, or id on false
-
$returnObjects
Test if given categry has the one represented by given id as ancestor
void
hasAncestor
(integer $category)
-
integer
$category: or CMS_moduleCateogry $category, the category to search in lineage
Test if given categry this one's parent
Test if given categry this one's root
This category contains any sibling ?
boolean
hasSiblings
()
Get the category protected status
boolean
isProtected
()
Test if given categry is a root one
boolean
isRoot
()
Setter for any private attribute on this class
void
setAttribute
(string $name, $value $value)
-
string
$name: name of attribute to set
-
$value
$value: , the value to give
Sets a new description
void
setDescription
(string $value, [mixed $language = false])
-
string
$value
-
mixed
$language: : CMS_language or language code
Sets a file name
void
setFile
(string $value, [mixed $language = false])
-
string
$value
-
mixed
$language: : CMS_language or language code
Sets a new label
void
setLabel
(string $value, [mixed $language = false])
-
string
$value
-
mixed
$language: : CMS_language or language code
Set the category protected status
boolean
setProtected
(boolean $protected)
-
boolean
$protected: The new category protected status
Writes into persistence (MySQL for now), along with base data.
boolean
writeToPersistence
()
Prepare _labels attribute arrays with data from i18NM table
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()