Class CMS_row

Description

Class CMS_row

represent a client space row which contains blocks.

Located in /automne/classes/modules/standard/row.php (line 28)

CMS_grandFather
   |
   --CMS_row
Class Constant Summary
Method Summary
 void __construct ([integer $id = 0], [string $tagID = false])
 boolean addGroup (string $group)
 array asArray ([array $params = array()],  &$files, array $files)
 boolean belongsToGroup (string $group)
 boolean convertDefinitions (CMS_module $module)
 void delAllGroups ()
 boolean delGroup (string $group)
 void destroy ()
 boolean fromArray (array $data, array $params, CMS_language $cms_language,  &$idsRelation,  &$infos, array $idsRelation, string $infos)
 CMS_XMLTag getBlockTagById (string $blockID)
 string getData (CMS_language &$language, CMS_page &$page, CMS_clientSpace &$clientSpace, integer $visualizationMode, [ $templateHasPages = false], [boolean $rowCanBeEdited = true], boolean $templateHasPages,)
 string getDefinition ()
 string getDescription ()
 array(string) getFilteredTemplates ()
 array(string) getGroups ()
 integer getID ()
 string getImage ([ $from = CMS_file::WEBROOT], [boolean $fileOnly = false], string $form)
 void getJSonDescription ( $user,  $cms_language, [ $withDefinition = false])
 string getLabel ()
 array(CMS_module) getModules ([ $outputObjects = true])
 integer getTagID ()
 boolean hasClientSpaces ()
 boolean hasUserRight ( &$cms_user, [ $right = CLEARANCE_MODULE_VIEW], CMS_profile_user $cms_user, integer $right,)
 boolean isUseable ()
 boolean setDefinition (string $definition, [boolean $haltOnPolymodParsing = true])
 void setDefinitionFile (string $filename)
 boolean setDescription ( $description, string $label)
 void setFilteredTemplates (array $tplsFilter)
 boolean setImage ([string $image = 'nopicto.gif'])
 boolean setLabel (string $label)
 boolean setUsability (boolean $usability)
 boolean writeToPersistence ()
 string _parseDefinitionFile ( &$modulesTreatment, CMS_modulesTags $modulesTreatment)
Methods
Constructor __construct (line 147)

Constructor.

  • access: public
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)
addGroup (line 772)

Add a group to the list.

  • return: true on success, false on failure
  • access: public
boolean addGroup (string $group)
  • string $group: The group to add
asArray (line 938)

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. Not used here
  • array $files: The reference to the founded files used by object
  • &$files
belongsToGroup (line 760)

Does the row has the specified group in its stack ?.

  • return: true if the row belongs to that group, false otherwise
  • access: public
boolean belongsToGroup (string $group)
  • string $group: The group we want to test
convertDefinitions (line 1064)

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

  • return: : true on success, false on failure
  • access: public
boolean convertDefinitions (CMS_module $module)
delAllGroups (line 809)

Deletes all the groups stack

  • access: public
void delAllGroups ()
delGroup (line 793)

Remove a group from the list.

  • return: true on success, false on failure
  • access: public
boolean delGroup (string $group)
  • string $group: The group to remove
destroy (line 719)

Totally destroys the row from persistence, including its definition file.

  • access: public
void destroy ()
fromArray (line 975)

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( 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
getBlockTagById (line 422)

Gets a block tag, taken from the definition file

  • return: the block tag
  • access: public
CMS_XMLTag getBlockTagById (string $blockID)
  • string $blockID: the block id to get
getData (line 575)

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.

  • return: the data from the blocks and the definition file.
  • access: public
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
getDefinition (line 399)

Gets the definition as string data, taken from the definition file

  • return: the definition
  • access: public
string getDefinition ()
getDefinitionFileName (line 388)

Gets the definition file name.

  • return: the file name of the definition file, without any path indication.
  • access: public
string getDefinitionFileName ()
getDescription (line 313)

Gets the description

  • return: The label
  • access: public
string getDescription ()
getFilteredTemplates (line 361)

Get the filtered templates for the row

  • return: The filtered templates IDs
  • access: public
array(string) getFilteredTemplates ()
getGroups (line 743)

Gets the groups the row belongs to.

  • return: The groups represented by their string in an array
  • access: public
array(string) getGroups ()
getID (line 223)

Gets the DB ID.

  • return: the DB id
  • access: public
integer getID ()
getImage (line 258)

Gets the row image.

  • return: the row image filename
  • access: public
string getImage ([ $from = CMS_file::WEBROOT], [boolean $fileOnly = false], string $form)
  • string $form: location of image
  • boolean $fileOnly: for return just filename
  • $from
getJSonDescription (line 863)
void getJSonDescription ( $user,  $cms_language, [ $withDefinition = false])
  • $user
  • $cms_language
  • $withDefinition
getLabel (line 245)

Gets the label.

  • return: the label
  • access: public
string getLabel ()
getModules (line 447)

Gets the modules included in the template. Excludes the standard module.

  • return: The modules present in the template via module client spaces
  • access: public
array(CMS_module) getModules ([ $outputObjects = true])
  • $outputObjects
getTagID (line 234)

Gets the XML tag ID.

  • return: the DB id
  • access: public
integer getTagID ()
hasClientSpaces (line 191)

Does the row participates to one or more client spaces ?

  • return: true if it's the case
  • access: public
boolean hasClientSpaces ()
hasUserRight (line 466)

Check the given user right on row

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

Is the row useable by users ?

  • access: public
boolean isUseable ()
setDefinition (line 498)

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)

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

Set filename of row

void setDefinitionFile (string $filename)
  • string $filename: Filename
setDescription (line 325)

Sets the description.

  • return: true on success, false on failure.
  • access: public
boolean setDescription ( $description, string $label)
  • string $label: The label to set
  • $description
setFilteredTemplates (line 373)

Set the filtered templates. Must be an array of templates Ids

  • access: public
void setFilteredTemplates (array $tplsFilter)
  • array $tplsFilter
setImage (line 275)

Sets the image. Can be empty. Must have the gif, jpg, jpeg or png extension.

  • return: true on success, false on failure.
  • access: public
boolean setImage ([string $image = 'nopicto.gif'])
  • string $image: the image to set
setLabel (line 297)

Sets the label.

  • return: true on success, false on failure to set it
  • access: public
boolean setLabel (string $label)
  • string $label: the label to set
setUsability (line 349)

Sets the usability

  • return: true on success, false on failure.
  • access: public
boolean setUsability (boolean $usability)
  • boolean $usability: The new usablility to set
writeToPersistence (line 819)

Writes the row into persistence (MySQL for now).

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

Parse the definition file to instanciate the _blocks attribute

  • return: false on success, the parsing error string if any
  • access: public
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()
Class Constants
MESSAGE_BLOCK_CONTENT_ERROR = 1598 (line 36)
MESSAGE_BUTTON_CLEAR = 1128 (line 39)
MESSAGE_CLEAR_ROW_CONFIRM = 1129 (line 40)
MESSAGE_DELETE_ROW_CONFIRM = 844 (line 33)

Messages

MESSAGE_DESC_ACTIVE = 1537 (line 46)
MESSAGE_DESC_FILE = 1544 (line 53)
MESSAGE_DESC_GROUPS = 1535 (line 44)
MESSAGE_DESC_NO = 1539 (line 48)
MESSAGE_DESC_NONE = 1536 (line 45)
MESSAGE_DESC_PAGES = 1543 (line 52)
MESSAGE_DESC_REGENERATE = 1542 (line 51)
MESSAGE_DESC_ROW_TEMPLATE = 1534 (line 43)
MESSAGE_DESC_SEE = 1541 (line 50)
MESSAGE_DESC_TEMPLATES = 1532 (line 41)
MESSAGE_DESC_USAGE_RESTRICTION = 1533 (line 42)
MESSAGE_DESC_USED = 1540 (line 49)
MESSAGE_DESC_YES = 1538 (line 47)
MESSAGE_PAGE_BLOCK_SYNTAX_ERROR = 1295 (line 34)
MESSAGE_PAGE_ROW_SYNTAX_ERROR = 1296 (line 35)

Inherited Constants

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

Documentation generated on Wed, 15 Feb 2012 15:38:35 +0100 by phpDocumentor 1.4.3