Constructor.
void
__construct
([integer $id = 0], [string $tagID = false])
-
integer
$id: the DB ID of the row
-
string
$tagID: the XML Tag ID of the row (if instansiated from the tag)
Add a group to the list.
boolean
addGroup
(string $group)
-
string
$group: The group to add
Get object as an array structure used for export
array
asArray
([array $params = array()], &$files, array $files)
-
array
$params: The export parameters. Not used here
-
array
$files: The reference to the founded files used by object
-
&$files
Does the row has the specified group in its stack ?.
boolean
belongsToGroup
(string $group)
-
string
$group: The group we want to test
Convert all definitions used by this object from human format to Automne format.
This method is usually used at end of module import process, when all objects are imported
Deletes all the groups stack
void
delAllGroups
()
Remove a group from the list.
boolean
delGroup
(string $group)
-
string
$group: The group to remove
Totally destroys the row from persistence, including its definition file.
void
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( 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
Gets a block tag, taken from the definition file
-
string
$blockID: the block id to get
Gets the data, using the specified visualization mode.
The data is taken from the blocks and reintroduced into the definition file which may itself contain HTML instructions.
string
getData
(
CMS_language &$language,
CMS_page &$page,
CMS_clientSpace &$clientSpace,
integer $visualizationMode, [
$templateHasPages =
false], [
boolean $rowCanBeEdited =
true],
boolean $templateHasPages,)
-
CMS_language
&$language: The language of the administration frontend
-
CMS_page
&$page: the page parsed
-
CMS_clientSpace
&$clientSpace: the client space parsed
-
integer
$visualizationMode: the visualization mode
-
boolean
$templateHasPages,: set to true will die access to up/down buttons
-
boolean
$rowCanBeEdited: determine we can edit it this page (Display form)
-
$templateHasPages
Gets the definition as string data, taken from the definition file
string
getDefinition
()
Gets the definition file name.
string
getDefinitionFileName
()
Gets the description
string
getDescription
()
Get the filtered templates for the row
array(string)
getFilteredTemplates
()
Gets the groups the row belongs to.
array(string)
getGroups
()
Gets the DB ID.
integer
getID
()
Gets the row image.
string
getImage
([ $from = CMS_file::WEBROOT], [boolean $fileOnly = false], string $form)
-
string
$form: location of image
-
boolean
$fileOnly: for return just filename
-
$from
void
getJSonDescription
( $user, $cms_language, [ $withDefinition = false])
-
$user
-
$cms_language
-
$withDefinition
Gets the label.
string
getLabel
()
Gets the modules included in the template. Excludes the standard module.
array(CMS_module)
getModules
([ $outputObjects = true])
Gets the XML tag ID.
integer
getTagID
()
Does the row participates to one or more client spaces ?
boolean
hasClientSpaces
()
Check the given user right on row
boolean
hasUserRight
(
&$cms_user, [
$right =
CLEARANCE_MODULE_VIEW],
CMS_profile_user $cms_user,
integer $right,)
-
CMS_profile_user
$cms_user: The user profile to check right
-
integer
$right,: the right to check
-
&$cms_user
-
$right
Is the row useable by users ?
boolean
isUseable
()
Sets the definition from a string. Must write the definition to file and try to parse it The file must be in a specific directory : PATH_TEMPLATES_ROWS_FS (see constants from rc file)
boolean
setDefinition
(string $definition, [boolean $haltOnPolymodParsing = true])
-
string
$definition: The definition
-
boolean
$haltOnPolymodParsing: Stop setting definition if error on polymod parsing are founded (default : true)
Set filename of row
void
setDefinitionFile
(string $filename)
-
string
$filename: Filename
Sets the description.
boolean
setDescription
( $description, string $label)
-
string
$label: The label to set
-
$description
Set the filtered templates. Must be an array of templates Ids
void
setFilteredTemplates
(array $tplsFilter)
Sets the image. Can be empty. Must have the gif, jpg, jpeg or png extension.
boolean
setImage
([string $image = 'nopicto.gif'])
-
string
$image: the image to set
Sets the label.
boolean
setLabel
(string $label)
-
string
$label: the label to set
Sets the usability
boolean
setUsability
(boolean $usability)
-
boolean
$usability: The new usablility to set
Writes the row into persistence (MySQL for now).
boolean
writeToPersistence
()
Parse the definition file to instanciate the _blocks attribute
string
_parseDefinitionFile
(
&$modulesTreatment,
CMS_modulesTags $modulesTreatment)
-
CMS_modulesTags
$modulesTreatment: tags object treatment
-
&$modulesTreatment
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()