Class CMS_pageTemplatesCatalog

Description

Class CMS_pageTemplatesCatalog

Manages the collection of page templates.

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

CMS_grandFather
   |
   --CMS_pageTemplatesCatalog
Method Summary
 static array(CMS_pageTemplate) getAll ([boolean $includeInactive = false], [ $keyword = ''], [ $groups = array()], [ $website = ''], [ $tplIds = array()], [ $user = false], [ $start = 0], [ $limit = 0], [ $returnObjects = true], [ &$score = array()])
 static array(string) getAllGroups ([ $returnStack = false])
 static array(CMS_profile_user) getByGroup (string $group)
 static CMS_pageTemplate getByID (integer $id)
 static a getCloneFromID ([anyTemplateID $templateID = 0], [String $label = false], [boolean $setPrivate = false], [boolean $dontCopyClientSpaces = false], [integer $tplFrom = false])
 static array getPagesByTemplate (integer/CMS_pageTemplate $template, [boolean $returnObjects = false])
 static integer getTemplateIDForCloneID (integer $cloneID)
 static array getTemplatesReplacement (CMS_pageTemplate $tplFrom,  $user, [integer $pageId = false], CMS_profile_user $cms_user)
Methods
static getAll (line 59)

Returns all the page Templates, sorted by label.

Static function.

  • access: public
static array(CMS_pageTemplate) getAll ([boolean $includeInactive = false], [ $keyword = ''], [ $groups = array()], [ $website = ''], [ $tplIds = array()], [ $user = false], [ $start = 0], [ $limit = 0], [ $returnObjects = true], [ &$score = array()])
  • boolean $includeInactive: If set to true, don't watch inactive templates
  • $keyword
  • $groups
  • $website
  • $tplIds
  • $user
  • $start
  • $limit
  • $returnObjects
  • &$score
static getAllGroups (line 233)

Get All Groups Static function

  • access: public
static array(string) getAllGroups ([ $returnStack = false])
  • $returnStack
static getByGroup (line 212)

Returns all the page templates within group Static function

  • access: public
static array(CMS_profile_user) getByGroup (string $group)
  • string $group: The group the templates belongs to
static getByID (line 41)

Returns a CMS_pageTemplate when given an ID Static function.

  • return: or false on failure to find it
  • access: public
static CMS_pageTemplate getByID (integer $id)
  • integer $id: The DB ID of the wanted CMS_pageTemplate
static getCloneFromID (line 285)

public static getCloneFromID

Clones a Template, changes some attributes and writes it to persistence (MySQL for now)

  • return: valid new CMS_pageTemplate
static a getCloneFromID ([anyTemplateID $templateID = 0], [String $label = false], [boolean $setPrivate = false], [boolean $dontCopyClientSpaces = false], [integer $tplFrom = false])
  • boolean $setPrivate: Should the template be set as a private one ? ALSO determines if the new template should point to the same file
  • boolean $dontCopyClientSpaces: Should the clientspaces be copied ?
  • integer $tplFrom: the original template ID to get good rows
  • anyTemplateID $templateID: as the ID of Template to be cloned
  • String $label: label receive a new label for this Template
static getPagesByTemplate (line 456)

Return pages IDs coresponding of a given template ID

  • return: : pages IDs or pages objects
  • access: public
static array getPagesByTemplate (integer/CMS_pageTemplate $template, [boolean $returnObjects = false])
  • integer/CMS_pageTemplate $template: templateID : the template to get pagesIDs
  • boolean $returnObjects: returnObjects : to return pages objects or pages IDs
static getTemplateIDForCloneID (line 413)

Return a template ID corresponding of a given clone ID

  • return: : the template ID or false if none founded
  • access: public
static integer getTemplateIDForCloneID (integer $cloneID)
  • integer $cloneID: cloneID : the clone ID to get template ID
static getTemplatesReplacement (line 508)

Get all templates replacement for a given template

  • return: : templates replacements array('match' => array(CMS_pageTemplate), 'nomatch' => array(CMS_pageTemplate));
  • access: public
static array getTemplatesReplacement (CMS_pageTemplate $tplFrom,  $user, [integer $pageId = false], CMS_profile_user $cms_user)
  • CMS_pageTemplate $tplFrom: : the template to get replacements
  • CMS_profile_user $cms_user: : user to get template replacements (to check rights)
  • integer $pageId: : user to get template replacements (to check websites)
  • $user

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

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