Class CMS_pageTemplate

Description

Class CMS_pageTemplate

represent a page template.

Located in /automne/classes/tree/pagetemplate.php (line 31)

CMS_grandFather
   |
   --CMS_pageTemplate
Class Constant Summary
Method Summary
 void __construct ([integer $id = 0])
 boolean addGroup (string $group)
 boolean belongsToGroup (string $group)
 void delAllGroups ()
 boolean delDeniedWebsite (integer $website)
 boolean delGroup (string $group)
 boolean denyWebsite (integer $website)
 void destroy ([ $withDefinitionFile = false])
 array(CMS_xmlTag) getClientSpacesTags ()
 string getContent ( &$language,  &$page, integer $visualizationMode, CMS_language $language, CMS_page $page)
 string getDefinition ()
 string getDefinitionFile ()
 string getDescription ()
 array(string) getGroups ()
 integer getID ()
 string getImage ()
 void getJSonDescription ( $user,  $cms_language, [ $withDefinition = false])
 string getLabel ()
 array(codename getModules ([ $returnObject = true])
 array(CMS_page) getPages ([boolean $withClones = false])
 array(string) getPrintingClientSpaces ()
 array(integer) getWebsitesDenied ()
 boolean hasModule (string $codename)
 boolean hasPages ()
 boolean isDraft ()
 boolean isPrivate ()
 boolean isUseable ()
 boolean renameTemplate (string $label)
 boolean setDefinition (string $definition)
 string setDefinitionFile (string $filename)
 boolean setDescription ( $description, string $label)
 boolean setImage ([string $image = 'nopicto.gif'])
 boolean setLabel (string $label)
 void setPrintingClientSpaces (array $CSTagsIDs)
 boolean setPrivate (boolean $private)
 boolean setUsability (boolean $usability)
 boolean writeToPersistence ()
 string _parseDefinitionFile ( &$modulesTreatment, [ $convert = null], CMS_modulesTags $modulesTreatment)
Methods
Constructor __construct (line 147)

Constructor.

initializes the template if the id is given.

  • access: public
void __construct ([integer $id = 0])
  • integer $id: DB id
addGroup (line 526)

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
belongsToGroup (line 513)

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

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

Deletes all the groups stack

  • access: public
void delAllGroups ()
delAllWebsiteDenied (line 443)

Deletes all the websites denied stack

  • access: public
void delAllWebsiteDenied ()
delDeniedWebsite (line 426)

Remove a denied website from the list.

  • return: true on success, false on failure
  • access: public
boolean delDeniedWebsite (integer $website)
  • integer $website: The website to remove
delGroup (line 547)

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
denyWebsite (line 405)

Add a denied website to the list.

  • return: true on success, false on failure
  • access: public
boolean denyWebsite (integer $website)
  • integer $website: The website to denied
destroy (line 939)

Totally destroys the template, including its definition file

  • access: public
void destroy ([ $withDefinitionFile = false])
  • $withDefinitionFile
getClientSpacesTags (line 454)

Gets the client spaces tags arrays.

  • return: The tag interpreted by parser, a client space
  • access: public
array(CMS_xmlTag) getClientSpacesTags ()
getContent (line 692)

Get the content of the template for the specified page and visualization mode.

Doesn't translates the atm-linx tags.

  • return: the content
  • access: private
string getContent ( &$language,  &$page, integer $visualizationMode, CMS_language $language, CMS_page $page)
  • CMS_language $language: The language of the administration frontend (for FORM visualization mode)
  • CMS_page $page: The page we want the content of
  • integer $visualizationMode: The visualization mode of the page
  • &$language
  • &$page
getDefinition (line 620)

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

  • return: the definition
  • access: public
string getDefinition ()
getDefinitionFile (line 575)

Get the definition file name

  • return: The definition file name.
  • access: public
string getDefinitionFile ()
getDescription (line 231)

Gets the description

  • return: The label
  • access: public
string getDescription ()
getGroups (line 371)

Gets the groups the template belongs to.

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

Gets the DB ID of the instance.

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

Gets the image file.

  • return: the image file name
  • access: public
string getImage ()
getJSonDescription (line 1056)
void getJSonDescription ( $user,  $cms_language, [ $withDefinition = false])
  • $user
  • $cms_language
  • $withDefinition
getLabel (line 202)

Gets the label

  • return: The label
  • access: public
string getLabel ()
getModules (line 474)

Gets the modules included in the template.

  • return: => CMS_module) The modules present in the template via module client spaces
  • access: public
array(codename getModules ([ $returnObject = true])
  • $returnObject
getPages (line 820)

Get the pages based on this template or templates clones

  • return: The pages
  • access: private
array(CMS_page) getPages ([boolean $withClones = false])
  • boolean $withClones: : get also all pages based on the clones (default : false)
getPrintingClientSpaces (line 762)

Get the clientspaces order

  • return: The clientspaces tag IDs attributes
  • access: public
array(string) getPrintingClientSpaces ()
getWebsitesDenied (line 388)

Gets the websites denied for the template.

  • return: The websites denied id
  • access: public
array(integer) getWebsitesDenied ()
hasModule (line 495)

Does the template include module clientspace

  • access: public
boolean hasModule (string $codename)
  • string $codename: The module codename
hasPages (line 789)

Has this template any pages based on it ?

  • access: public
boolean hasPages ()
isDraft (line 742)

is this template content in draft ?

  • access: public
boolean isDraft ()
isPrivate (line 327)

is the template have private flag

  • return: true on success, false on failure.
  • access: public
boolean isPrivate ()
isUseable (line 290)

Is the module useable by users ?

  • access: public
boolean isUseable ()
renameTemplate (line 256)

Rename the template and all sub-templates

  • return: true on success, false on failure.
  • access: public
boolean renameTemplate (string $label)
  • string $label: The label to set
setDefinition (line 645)

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_FS (see constants from rc file)

  • return: true on success, false on failure
  • access: public
boolean setDefinition (string $definition)
  • string $definition: The definition
setDefinitionFile (line 587)

Set the definition file name

  • return: the parsing error if any, false otherwise
  • access: public
string setDefinitionFile (string $filename)
  • string $filename: The name of the file (without any path information)
setDescription (line 243)

Sets the description.

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

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 214)

Sets the label.

  • return: true on success, false on failure.
  • access: public
boolean setLabel (string $label)
  • string $label: The label to set
setPrintingClientSpaces (line 774)

Set the clientspaces order. Must be an array of CS Ids

  • access: public
void setPrintingClientSpaces (array $CSTagsIDs)
  • array $CSTagsIDs
setPrivate (line 315)

Sets the private flag

  • return: true on success, false on failure.
  • access: public
boolean setPrivate (boolean $private)
  • boolean $private: The new flag to set
setUsability (line 302)

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 999)

Writes the template into persistence (MySQL for now).

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

Parse the definition file as to get the client spaces

  • return: The error string from the parser, false if no error
  • access: private
string _parseDefinitionFile ( &$modulesTreatment, [ $convert = null], CMS_modulesTags $modulesTreatment)
  • CMS_modulesTags $modulesTreatment: tags object treatment
  • &$modulesTreatment
  • $convert

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
CONVERT_TO_AUTOMNE = 2 (line 53)
CONVERT_TO_HUMAN = 1 (line 52)
MESSAGE_BLOCK_SYNTAX_ERROR = 1295 (line 47)
MESSAGE_DESC_ACTIVE = 1537 (line 38)
MESSAGE_DESC_GROUPS = 1535 (line 36)
MESSAGE_DESC_NO = 1539 (line 40)
MESSAGE_DESC_NONE = 1536 (line 37)
MESSAGE_DESC_PAGES = 1543 (line 44)
MESSAGE_DESC_REGENERATE = 1542 (line 43)
MESSAGE_DESC_SEE = 1541 (line 42)
MESSAGE_DESC_TEMPLATE = 1545 (line 34)
MESSAGE_DESC_USED = 1540 (line 41)
MESSAGE_DESC_WEBSITES = 1546 (line 35)
MESSAGE_DESC_XML_FILE = 723 (line 45)
MESSAGE_DESC_YES = 1538 (line 39)
MESSAGE_TPL_SYNTAX_ERROR = 1296 (line 46)

Inherited Constants

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

Documentation generated on Wed, 15 Feb 2012 15:36:11 +0100 by phpDocumentor 1.4.3