Get the array of visualization modes, without textual information as it's useless Static function.
static void
getAllVisualizationModes
()
Constructor.
initializes the page if the id is given.
void
__construct
([integer $id = 0])
Delete the page file, html file, print files and the page linx file
boolean
deleteFiles
()
Duplicate current page into another one All contents and external datas are duplicated too
CMS_page
duplicate
(
CMS_user &$user, [
integer $templateID =
0], [
boolean $dontDuplicateContent =
false])
-
boolean
$dontDuplicateContent: If true, the content of the page is not duplicated
-
CMS_user
&$user: user, the user processing to creation
-
integer
$templateID: templateID, a new template to duplicate the page with
Duplicate current page contents into another one All contents and external datas are duplicated too
boolean
duplicateContent
(CMS_user &$user, &$page)
-
CMS_user
&$user: user, the user processing to creation
-
&$page
Gets the author base data
string
getAuthor
([boolean $public = false], [boolean $queryWebsite = true])
-
boolean
$public: Do we want the edited or public value ?
-
boolean
$queryWebsite: : Do we get the meta value from website if does not exists for the page itself ?
Gets the url in base data.
string
getBaseDataURL
([boolean $public = false])
-
boolean
$public: Do we want the edited or public value ?
Gets the category base data
string
getCategory
([boolean $public = false], [boolean $queryWebsite = true])
-
boolean
$public: Do we want the edited or public value ?
-
boolean
$queryWebsite: : Do we get the meta value from website if does not exists for the page itself ?
Gets the codename base data.
string
getCodename
([boolean $public = false])
-
boolean
$public: Do we want the edited or public value ?
Get the page content for the specified visualization mode and language.
string
getContent
( &$language, [ $visualizationMode = false])
-
&$language
-
$visualizationMode
Gets the copyright base data
string
getCopyright
([boolean $public = false], [boolean $queryWebsite = true])
-
boolean
$public: Do we want the edited or public value ?
-
boolean
$queryWebsite: : Do we get the meta value from website if does not exists for the page itself ?
Gets the description base data.
string
getDescription
([boolean $public = false], [boolean $queryWebsite = true])
-
boolean
$public: Do we want the edited or public value ?
-
boolean
$queryWebsite: : Do we get the meta value from website if does not exists for the page itself ?
Get the page HTML URL.
string
getHTMLURL
([boolean $printPage = false], [boolean $returnFilenameOnly = false], [constant $relativeTo = PATH_RELATIVETO_WEBROOT])
-
boolean
$printPage: Do we want the print page URL ?
-
boolean
$returnFilenameOnly: : return only the page filename (default false)
-
constant
$relativeTo: : get URL relative to webroot (PATH_RELATIVETO_WEBROOT) or file system (PATH_RELATIVETO_FILESYSTEM)
Gets the DB ID of the instance.
integer
getID
()
Redefinition of:
- CMS_resource::getID()
- Gets the DB ID of the instance.
Gets the keywords base data.
string
getKeywords
([boolean $public = false], [boolean $queryWebsite = true])
-
boolean
$public: Do we want the edited or public value ?
-
boolean
$queryWebsite: : Do we get the meta value from website if does not exists for the page itself ?
Gets the language base data
string
getLanguage
([boolean $public = false], [boolean $queryWebsite = true])
-
boolean
$public: Do we want the edited or public value ?
-
boolean
$queryWebsite: : Do we get the meta value from website if does not exists for the page itself ?
Get the date of last file creation
Gets the link-title base data.
string
getLinkTitle
([boolean $public = false])
-
boolean
$public: Do we want the edited or public value ?
Get the linx file path.
string
getLinxFilePath
()
Gets a meta value from website.
string
getMetaFromWebsite
(string $meta)
-
string
$meta: : the meta name to get
Gets the metas base data
string
getMetas
([boolean $public = false], [boolean $queryWebsite = true])
-
boolean
$public: Do we want the edited or public value ?
-
boolean
$queryWebsite: : Do we get the meta value from website if does not exists for the page itself ?
Get HTML meta tags for a given page
string
getMetaTags
([boolean $public = false], [array $tags = array()])
-
boolean
$public: Do we want the edited or public value ? (default : false => edited).
-
array
$tags: the tags names to activate/desactivate (by default all tags are present if they have content) array('description' => false)
Get the modules contained in the page (via the module clientspaces)
array(CMS_module)
getModules
()
Gets the Pragma base data
string
getPragma
([boolean $public = false])
-
boolean
$public: Do we want the edited or public value ?
Get the print status for this page
boolean
getPrintStatus
()
Gets the redirect link.
CMS_href
getRedirectLink
([
boolean $public =
false])
-
boolean
$public: Do we want the edited or public value ?
Gets the refresh base data
string
getRefresh
([boolean $public = false])
-
boolean
$public: Do we want the edited or public value ?
Gets the refresh url base data.
string
getRefreshURL
([boolean $public = false])
-
boolean
$public: Do we want the edited or public value ?
Gets the page reminded editors for an edition
array(CMS_profile_user)
getRemindedEditors
(integer $edition)
-
integer
$edition: The edition the user should have made to be returned
Gets the page reminded editors stack
Gets the reminder On base data.
CMS_date
getReminderOn
([
boolean $public =
false])
-
boolean
$public: Do we want the edited or public value ?
Gets the reminder On message base data.
string
getReminderOnMessage
([boolean $public = false])
-
boolean
$public: Do we want the edited or public value ?
Gets the reminder periodicity base data.
integer
getReminderPeriodicity
([boolean $public = false])
-
boolean
$public: Do we want the edited or public value ?
Gets the replyto base data
string
getReplyto
([boolean $public = false], [boolean $queryWebsite = true])
-
boolean
$public: Do we want the edited or public value ?
-
boolean
$queryWebsite: : Do we get the meta value from website if does not exists for the page itself ?
Gets the robots base data
string
getRobots
([boolean $public = false], [boolean $queryWebsite = true])
-
boolean
$public: Do we want the edited or public value ?
-
boolean
$queryWebsite: : Do we get the meta value from website if does not exists for the page itself ?
Gets the template of the page
Gets the title base data.
string
getTitle
([boolean $public = false])
-
boolean
$public: Do we want the edited or public value ?
get object type label
string
getTypeLabel
(mixed $language)
-
mixed
$language: the language code (string) or the CMS_language (object) to use for label
Get the page online URL.
string
getURL
([boolean $printPage = false], [boolean $returnFilenameOnly = false], [constant $relativeTo = PATH_RELATIVETO_WEBROOT], [boolean $force = false], [boolean $doNotShorten = false])
-
boolean
$printPage: Do we want the print page URL ?
-
boolean
$returnFilenameOnly: : return only the page filename (default false)
-
constant
$relativeTo: : get URL relative to webroot (PATH_RELATIVETO_WEBROOT) or file system (PATH_RELATIVETO_FILESYSTEM)
-
boolean
$force: : get URL even if page is not published (default : false)
-
boolean
$doNotShorten: : get full page URL (default : false)
Does the page use module
boolean
hasModule
(string $codename)
-
string
$codename: The module codename
is this page content in draft ?
boolean
isDraft
()
Get the page https status
boolean
isHTTPS
()
Get the page protected status
boolean
isProtected
()
is this page the tree root ?
boolean
isRoot
()
Is page useable (not in DELETED or ARCHIVED locations)
boolean
isUseable
()
Gets the page redirection code to html page.
string
redirectionCode
(string $filePath)
-
string
$filePath: the html filepath
Regenerate the page file, either from scratch or from the linx file.
If linx file doesn't exists, the file is regenerated from scratch (obviously).
boolean
regenerate
([boolean $fromScratch = false])
-
boolean
$fromScratch: If false, regenerate from the linx file, otherwise regenerate linx file first.
Sets the author base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the category base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the codename base data.
boolean
setCodename
(
string $data,
CMS_profile_user &$user, [
boolean $checkForDuplicate =
true])
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
-
boolean
$checkForDuplicate: : check the codename for website duplication
Sets the copyright base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the description base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Set the page https status
boolean
setHTTPS
(boolean $https)
-
boolean
$https: The new page https status
Sets the keywords base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the language base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the link-title base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the metas base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the Pragma base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Set the page protected status
boolean
setProtected
(boolean $protected)
-
boolean
$protected: The new page protected status
Sets the reminder On Message base data.
Sets the refresh base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the refresh url base data.
-
boolean
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the page reminded editors from a stack
boolean
setRemindedEditorsStack
(
CMS_stack $editorsStack)
-
CMS_stack
$editorsStack: The Reminded editors stack to set
Sets the reminder On base data.
Sets the reminder On Message base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the reminder periodicity base data.
-
integer
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the replyto base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the robots base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the page template
-
integer
$templateID: The DB ID of the new template to set
-
CMS_profile_user
$user: the user who did the edition (if not set, the edition is not considered)
Sets the title base data.
-
string
$data: The new base data to set
-
CMS_profile_user
&$user: the user who did the edition
Sets the last reminder to today
void
touchLastReminder
()
Validates an edition. Adds the publishing of siblings orders to the parent function, and the setting of reminded editors
boolean
validateEdition
(integer $edition)
-
integer
$edition: the edition to validate
Redefinition of:
- CMS_resource::validateEdition()
- Validates an edition. Sets the status as validated if it's a content validation.
Validate the location proposition of the resource (proposedFor attribute).
This overloaded method deletes the html file if location proposed is outside userspace
void
validateProposedLocation
()
Redefinition of:
- CMS_resource::validateProposedLocation()
- Validate the location proposition of the resource (proposedFor attribute).
Write to disk the linx file, i.e. the content for the specified page.
Doesn't translates the atm-linx tags. Also writes the "print" linx file
boolean
writeLinxFile
()
Writes the page into persistence (MySQL for now), along with base data.
boolean
writeToPersistence
()
Redefinition of:
- CMS_resource::writeToPersistence()
- Writes the resource into persistence (MySQL for now).
Check that the base data is loaded (edited base data can't be loaded from DELETED or ARCHIVED locations)
boolean
_checkBaseData
([boolean $public = false])
-
boolean
$public: Is it the public or edited base data we want ?
Check that the template is instanciated.
void
_checkTemplate
()
Check that the website is instanciated.
void
_checkWebsite
()
Create new page URL filename
/!\ This method should be used only by validateEdition method, because it is a part of the page validation process ! It is used only for page filename change and destroy old filename files
boolean
_createNewURL
()
Get the page filename.
string
_getFilename
([ $regenerate = false])
Get the page path from its website
string
_getFilePath
(integer $relativeTo)
-
integer
$relativeTo: Relative to filesystem or webroot. See constants
Get the html page filename from the title.
string
_getHTMLFilename
()
Get the html page path from its website
string
_getHTMLFilePath
(integer $relativeTo)
-
integer
$relativeTo: Relative to filesystem or webroot. See constants
Inherited Methods
Inherited From CMS_resource
CMS_resource::CMS_resource()
CMS_resource::addEdition()
CMS_resource::addValidationRefused()
CMS_resource::cancelAllEditions()
CMS_resource::destroy()
CMS_resource::getAllDataLocations()
CMS_resource::getAllLinkTypes()
CMS_resource::getEditors()
CMS_resource::getEditorsStack()
CMS_resource::getID()
CMS_resource::getLocation()
CMS_resource::getLock()
CMS_resource::getLockDate()
CMS_resource::getProposedLocation()
CMS_resource::getPublication()
CMS_resource::getPublicationDateEnd()
CMS_resource::getPublicationDateStart()
CMS_resource::getStatus()
CMS_resource::isProposedForOutsideUserspace()
CMS_resource::lock()
CMS_resource::removeProposedLocation()
CMS_resource::resetEditorsStack()
CMS_resource::setProposedLocation()
CMS_resource::setPublicationDates()
CMS_resource::unlock()
CMS_resource::validateEdition()
CMS_resource::validateProposedLocation()
CMS_resource::writeToPersistence()
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()