Constructor.
initializes the template if the id is given.
void
__construct
([integer $id = 0])
Add a group to the list.
boolean
addGroup
(string $group)
-
string
$group: The group to add
Does the template has the specified group in its stack ?.
boolean
belongsToGroup
(string $group)
-
string
$group: The group we want to test
Deletes all the groups stack
void
delAllGroups
()
Deletes all the websites denied stack
void
delAllWebsiteDenied
()
Remove a denied website from the list.
boolean
delDeniedWebsite
(integer $website)
-
integer
$website: The website to remove
Remove a group from the list.
boolean
delGroup
(string $group)
-
string
$group: The group to remove
Add a denied website to the list.
boolean
denyWebsite
(integer $website)
-
integer
$website: The website to denied
Totally destroys the template, including its definition file
void
destroy
([ $withDefinitionFile = false])
Gets the client spaces tags arrays.
array(CMS_xmlTag)
getClientSpacesTags
()
Get the content of the template for the specified page and visualization mode.
Doesn't translates the atm-linx tags.
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
Gets the definition as string data, taken from the definition file
string
getDefinition
()
Get the definition file name
string
getDefinitionFile
()
Gets the description
string
getDescription
()
Gets the groups the template belongs to.
array(string)
getGroups
()
Gets the DB ID of the instance.
integer
getID
()
Gets the image file.
string
getImage
()
void
getJSonDescription
( $user, $cms_language, [ $withDefinition = false])
-
$user
-
$cms_language
-
$withDefinition
Gets the label
string
getLabel
()
Gets the modules included in the template.
array(codename
getModules
([ $returnObject = true])
Get the pages based on this template or templates clones
array(CMS_page)
getPages
([boolean $withClones = false])
-
boolean
$withClones: : get also all pages based on the clones (default : false)
Get the clientspaces order
array(string)
getPrintingClientSpaces
()
Gets the websites denied for the template.
array(integer)
getWebsitesDenied
()
Does the template include module clientspace
boolean
hasModule
(string $codename)
-
string
$codename: The module codename
Has this template any pages based on it ?
boolean
hasPages
()
is this template content in draft ?
boolean
isDraft
()
is the template have private flag
boolean
isPrivate
()
Is the module useable by users ?
boolean
isUseable
()
Rename the template and all sub-templates
boolean
renameTemplate
(string $label)
-
string
$label: The label to set
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)
boolean
setDefinition
(string $definition)
-
string
$definition: The definition
Set the definition file name
string
setDefinitionFile
(string $filename)
-
string
$filename: The name of the file (without any path information)
Sets the description.
boolean
setDescription
( $description, string $label)
-
string
$label: The label to set
-
$description
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
Set the clientspaces order. Must be an array of CS Ids
void
setPrintingClientSpaces
(array $CSTagsIDs)
Sets the private flag
boolean
setPrivate
(boolean $private)
-
boolean
$private: The new flag to set
Sets the usability
boolean
setUsability
(boolean $usability)
-
boolean
$usability: The new usablility to set
Writes the template into persistence (MySQL for now).
boolean
writeToPersistence
()
Parse the definition file as to get the client spaces
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()