Documentation

Page extends WidgetParseTarget implements Loggable

Page

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

CLOUDREXX Development Team info@cloudrexx.com

subpackage

core_contentmanager

Table of Contents

Interfaces

Loggable

Constants

NODE_URL_CMD  = \Cx\Core\Routing\NodePlaceholder::NODE_URL_CMD
Node Url regular expression back reference index for the module cmd
NODE_URL_LANG_ID  = \Cx\Core\Routing\NodePlaceholder::NODE_URL_LANG_ID
Node Url regular expression back reference index for the language id
NODE_URL_MODULE  = \Cx\Core\Routing\NodePlaceholder::NODE_URL_MODULE
Node Url regular expression back reference index for the module
NODE_URL_NODE_ID  = \Cx\Core\Routing\NodePlaceholder::NODE_URL_NODE_ID
Node Url regular expression back reference index for the node id
NODE_URL_PCRE  = \Cx\Core\Routing\NodePlaceholder::NODE_URL_PCRE
Regular expression to match a node-url in placeholder notation
NODE_URL_PLACEHOLDER  = \Cx\Core\Routing\NodePlaceholder::NODE_URL_PLACEHOLDER
Node Url regular expression back reference index for the whole placeholder
PLACEHOLDER_PREFIX  = \Cx\Core\Routing\NodePlaceholder::PLACEHOLDER_PREFIX
Prefex used in placeholders for Node-Urls: [[ NODE_(<node_id>|<module>[_<cmd>])[_<lang_id>] ]]
SOURCE_MODE_BLOCK  = 2
SOURCE_MODE_PLAIN  = 1
SOURCE_MODE_WYSIWYG  = 0
TYPE_ALIAS  = 'alias'
TYPE_APPLICATION  = 'application'
TYPE_CONTENT  = 'content'
TYPE_FALLBACK  = 'fallback'
TYPE_REDIRECT  = 'redirect'
TYPE_SYMLINK  = 'symlink'

Properties

$active  : bool
$applicationTemplate  : string
$backendAccessId  : int
$cmd  : string
$content  : text
$contentTitle  : string
$cssName  : string
$cssNavName  : string
$customContent  : string
$display  : bool
$editingStatus  : bool
$end  : date
$frontendAccessId  : int
$id  : int
$isVirtual  : bool
$lang  : int
$linkTarget  : string
$localeCodes  : array<string|int, mixed>
List of locale codes ordered by translation fallback order per Cx instance
$metadesc  : string
$metaimage  : string
$metakeys  : string
$metarobots  : string
$metatitle  : string
$module  : int
$nestingCount  : int
Counts the nesting level of __call()
$node  : Node
$nodeIdShadowed  : int
$protection  : int
$skin  : int
$slug  : string
$slugBase  : int
$slugSuffix  : int
$sourceMode  : int
Disables the WYSIWYG editor
$start  : date
$stringRepresentationBlank  : bool
Whether blank string representations are valid
$stringRepresentationFields  : array<string|int, mixed>
List of fields that should be available in the string representation
$stringRepresentationFormat  : string
Sprintf format for the string representation
$target  : string
$title  : string
$type  : string
$updatedAt  : datetime
$updatedBy  : string
$useCustomApplicationTemplateForAllChannels  : int
$useCustomContentForAllChannels  : int
$useSkinForAllChannels  : int
$validators  : array<string|int, mixed>
Initialize this array as follows: array( 'columName' => Zend_Validate )
$virtual  : bool
Defines if an entity is virtual and therefore not persistable.
$caching  : bool

Methods

__call()  : mixed
Route methods like getName(), getType(), getDirectory(), etc.
__construct()  : mixed
__get()  : mixed
This is an ugly solution to allow $this->cx to be available in all entity classes Since the entity's constructor is not called when an entity is loaded from DB this cannot be assigned there.
__toString()  : string
Returns this entity's identifying value
copy()  : Page
DO NOT CALL THIS METHOD! USE copyToLang() OR copyToNode() INSTEAD! Copies data from another Page.
copyProtection()  : bool
Clones the protection of this page to another page
copyToLang()  : Page
Creates a copy of this page with a different language.
copyToNode()  : Page
Creates a copy of this page which belongs to another node.
getActive()  : bool
Get status
getAliases()  : array<string|int, Page>
Returns an array of alias pages for a page
getApplicationTemplate()  : string
Get applicationTemplate
getBackendAccessId()  : int
Get backendAccessId
getCaching()  : bool
Get caching
getChangeFrequency()  : string
Returns the change frequency in XY (for use in sitemap or so)
getChildren()  : array<string|int, mixed>
Returns an array of child pages (pages of the same language of all subnodes)
getCmd()  : string
Get cmd
getComponentController()  : SystemComponent
Returns the component controller for this component
getContent()  : text
Get content
getContentTitle()  : string
Get contentTitle
getCssName()  : string
Get cssName
getCssNavName()  : string
Get cssNavName
getCustomContent()  : string
Get customContent
getDisplay()  : bool
Get display
getEditingStatus()  : bool
Get editingStatus
getEnd()  : date
Get end
getFallback()  : Page
Returns the fallback page of this page
getFrontendAccessId()  : int
Get frontendAccessId
getId()  : int
Get id
getKeyAsString()  : string
Returns this entity's key
getLang()  : int
Get lang
getLastModificationDateTime()  : DateTime
Returns the DateTime object for the modification time (for use in sitemap or so)
getLinkTarget()  : string
Get linkTarget
getMetadesc()  : string
Get metadesc
getMetaimage()  : string
Get metaimage
getMetakeys()  : string
Get metakeys
getMetarobots()  : int
Get metarobots
getMetatitle()  : string
Get metatitle
getModule()  : string
Get module
getNode()  : Node
Get node
getNodeIdShadowed()  : int
Get nodeIdShadowed
getParent()  : Page
Returns the page with the same language of the parent node e.g. $this->getNode()->getParent()->getPage($this->lang)
getPath()  : string
Get a pages' path starting with a slash
getProtection()  : int
Get protection
getRelatedBlocks()  : array<string|int, mixed>
Returns the blocks related to this page
getSkin()  : int
Get skin
getSlug()  : string
Get slug
getSourceMode()  : int
Get sourceMode
getStart()  : date
Get start
getStatus()  : bool
Get active
getTarget()  : string
Get target
getTargetCmd()  : mixed
Get the target pages' module cmd
getTargetLangId()  : int
Get the target pages' language id.
getTargetModule()  : mixed
Get the target pages' module name
getTargetNodeId()  : int
Gets the target nodes' id.
getTargetPage()  : Page
Gets the page this page points to
getTargetQueryString()  : string
Gets the target pages' querystring.
getTitle()  : string
Get title
getTranslatedFieldValue()  : mixed
Returns the value of a translatable field using fallback mechanisms
getType()  : string
Get page type
getUpdatedAt()  : datetime
Get updatedAt
getUpdatedBy()  : string
Get updatedBy
getURL()  : mixed
Returns "$protocolAndDomainWithPathOffset/link/to/page$params.
getUseCustomApplicationTemplateForAllChannels()  : int
Get useCustomApplicationTemplateForAllChannels
getUseCustomContentForAllChannels()  : int
Get useCustomContentForAllChannels
getUseSkinForAllChannels()  : int
Get useSkinForAllChannels
getVersion()  : LogEntry
Returns the current log for this page
getWidgetContent()  : Sigma
Returns the content for a widget
getWidgetContentAttributeName()  : string
Returns the name of the attribute used to parse Widget named $widgetName
initializeValidators()  : mixed
Set $this->validators
isActive()  : bool
Alias for getActive()
isBackendProtected()  : bool
Whether page access from backend is protected.
isDraft()  : bool
Checks whether the page is a draft or not
isFrontendProtected()  : bool
Whether page access from frontend is protected.
isTargetInternal()  : bool
Whether target references an internal page
isVirtual()  : bool
Whether the Page is intended to exist in DB or not.
isVisible()  : bool
Alias for getDisplay()
nextSlug()  : mixed
setActive()  : mixed
Set active
setAlias()  : mixed
Stores changes to the aliases for this page
setApplicationTemplate()  : mixed
Set applicationTemplate
setBackendAccessId()  : mixed
Set backendAccessId
setBackendProtection()  : void
Set the Page backend protection
setCaching()  : mixed
Set caching
setCmd()  : mixed
Set cmd
setContent()  : mixed
Set content
setContentOf()  : mixed
Copies the content from the other page given.
setContentTitle()  : mixed
Set contentTitle
setCssName()  : mixed
Set cssName
setCssNavName()  : mixed
Set cssNavName
setCustomContent()  : mixed
Set customContent
setDisplay()  : mixed
Set display
setEditingStatus()  : mixed
Set editingStatus
setEnd()  : mixed
Set end
setFrontendAccessId()  : mixed
Set frontendAccessId
setFrontendProtection()  : void
Set the Page frontend protection
setId()  : mixed
Set id
setLang()  : mixed
Set lang
setLinkTarget()  : mixed
Set linkTarget
setMetadesc()  : mixed
Set metadesc
setMetaimage()  : mixed
Set metaimage
setMetakeys()  : mixed
Set metakeys
setMetarobots()  : mixed
Set metarobots
setMetatitle()  : mixed
Set metatitle
setModule()  : mixed
Set module
setNode()  : mixed
Set node
setNodeIdShadowed()  : mixed
Set nodeIdShadowed
setProtection()  : mixed
Set protection
setRelatedBlocks()  : mixed
Sets relations to blocks
setSkin()  : mixed
Set skin
setSlug()  : mixed
Set slug
setSourceMode()  : mixed
Set sourceMode
setStart()  : mixed
Set start
setStatus()  : mixed
Set status
setTarget()  : mixed
Set target
setTitle()  : mixed
Set title
setType()  : mixed
Set type
setUpdatedAt()  : mixed
Set updatedAt
setUpdatedAtToNow()  : mixed
setUpdatedBy()  : mixed
Set updatedBy
setUseCustomApplicationTemplateForAllChannels()  : int
Get useCustomApplicationTemplateForAllChannels
setUseCustomContentForAllChannels()  : int
Get useCustomContentForAllChannels
setUseSkinForAllChannels()  : int
Set useSkinForAllChannels
setVirtual()  : mixed
Sets this pages virtual flag
titleExists()  : bool
Check whether the page $title already exists under the pages in $parentNode
translate()  : mixed
Translate the page into an other locale
updateFromArray()  : mixed
validate()  : mixed
createAccessId()  : mixed
cutTarget()  : mixed
eraseAccessId()  : mixed
getContentTemplateForWidget()  : Sigma
Returns the template in which the widget can be used
getFallbackLocaleCodes()  : array<string|int, mixed>
Returns a list of all locale codes ordered by fallback order
getStringRepresentationBlank()  : bool
Whether blank string representations are valid
getStringRepresentationFields()  : array<string|int, mixed>
Returns a list of fields available in the string representation
getStringRepresentationFormat()  : string
Returns the sprintf() format for the string representation
isSetModuleValid()  : bool
Verify if the set name in {@see static::$module} is a valid component name.
refreshSlug()  : mixed
Sets a correct slug based on the current title.
slugify()  : mixed
validateSlugForTopLevelUsage()  : void
Validates the slug for top level usage.

Constants

NODE_URL_CMD

Node Url regular expression back reference index for the module cmd

Use NodePlaceholder::... directly instead

public mixed NODE_URL_CMD = \Cx\Core\Routing\NodePlaceholder::NODE_URL_CMD

NODE_URL_LANG_ID

Node Url regular expression back reference index for the language id

Use NodePlaceholder::... directly instead

public mixed NODE_URL_LANG_ID = \Cx\Core\Routing\NodePlaceholder::NODE_URL_LANG_ID

NODE_URL_MODULE

Node Url regular expression back reference index for the module

Use NodePlaceholder::... directly instead

public mixed NODE_URL_MODULE = \Cx\Core\Routing\NodePlaceholder::NODE_URL_MODULE

NODE_URL_NODE_ID

Node Url regular expression back reference index for the node id

Use NodePlaceholder::... directly instead

public mixed NODE_URL_NODE_ID = \Cx\Core\Routing\NodePlaceholder::NODE_URL_NODE_ID

NODE_URL_PCRE

Regular expression to match a node-url in placeholder notation

Use NodePlaceholder::... directly instead

public mixed NODE_URL_PCRE = \Cx\Core\Routing\NodePlaceholder::NODE_URL_PCRE

NODE_URL_PLACEHOLDER

Node Url regular expression back reference index for the whole placeholder

Use NodePlaceholder::... directly instead

public mixed NODE_URL_PLACEHOLDER = \Cx\Core\Routing\NodePlaceholder::NODE_URL_PLACEHOLDER

PLACEHOLDER_PREFIX

Prefex used in placeholders for Node-Urls: [[ NODE_(<node_id>|<module>[_<cmd>])[_<lang_id>] ]]

Use NodePlaceholder::... directly instead

public mixed PLACEHOLDER_PREFIX = \Cx\Core\Routing\NodePlaceholder::PLACEHOLDER_PREFIX

SOURCE_MODE_BLOCK

public int SOURCE_MODE_BLOCK = 2

This page uses the block editor to edit its contents

SOURCE_MODE_PLAIN

public int SOURCE_MODE_PLAIN = 1

This page uses a plaintext field to edit its contents

SOURCE_MODE_WYSIWYG

public int SOURCE_MODE_WYSIWYG = 0

This page uses the WYSIWYG editor to edit its contents

TYPE_APPLICATION

public mixed TYPE_APPLICATION = 'application'

TYPE_CONTENT

public mixed TYPE_CONTENT = 'content'

TYPE_FALLBACK

public mixed TYPE_FALLBACK = 'fallback'

TYPE_REDIRECT

public mixed TYPE_REDIRECT = 'redirect'
public mixed TYPE_SYMLINK = 'symlink'

Properties

$applicationTemplate

protected string $applicationTemplate

$backendAccessId

protected int $backendAccessId

$frontendAccessId

protected int $frontendAccessId

$isVirtual

protected bool $isVirtual = false

Tells wheter this is a virtual (non DB) page or not

$localeCodes

List of locale codes ordered by translation fallback order per Cx instance

protected static array<string|int, mixed> $localeCodes = array()

Array in the form: array(<instanceId> => array(<localeCode>, ...))

Tags
see
getFallbackLocaleCodes()

$nestingCount

Counts the nesting level of __call()

protected static int $nestingCount = 0

$sourceMode

Disables the WYSIWYG editor

protected int $sourceMode

$stringRepresentationBlank

Whether blank string representations are valid

protected bool $stringRepresentationBlank = false

Whether blank string representations are valid

Tags
see
getStringRepresentationBlank()

$stringRepresentationFields

List of fields that should be available in the string representation

protected array<string|int, mixed> $stringRepresentationFields = array()

List of field names

Tags
see
getStringRepresentationFields()

$stringRepresentationFormat

Sprintf format for the string representation

protected string $stringRepresentationFormat = ''

Sprintf format string

Tags
see
getStringRepresentationFormat()

$useCustomApplicationTemplateForAllChannels

protected int $useCustomApplicationTemplateForAllChannels

$useCustomContentForAllChannels

protected int $useCustomContentForAllChannels

$useSkinForAllChannels

protected int $useSkinForAllChannels

$validators

Initialize this array as follows: array( 'columName' => Zend_Validate )

protected array<string|int, mixed> $validators = array()

$virtual

Defines if an entity is virtual and therefore not persistable.

protected bool $virtual = false

Defaults to FALSE - not virtual.

Methods

__call()

Route methods like getName(), getType(), getDirectory(), etc.

public __call(string $methodName, array<string|int, mixed> $arguments) : mixed
Parameters
$methodName : string

Name of method to call

$arguments : array<string|int, mixed>

List of arguments for the method to call

Tags
throws
Exception

If __call() nesting level reaches 20

Attributes
#[ReturnTypeWillChange]
Return values
mixed

Return value of the method to call

__get()

This is an ugly solution to allow $this->cx to be available in all entity classes Since the entity's constructor is not called when an entity is loaded from DB this cannot be assigned there.

public __get(mixed $name) : mixed
Parameters
$name : mixed
Attributes
#[ReturnTypeWillChange]

__toString()

Returns this entity's identifying value

public __toString() : string

By default this returns the same as getKeyAsString(), but this method might get overridden by subclasses.

Return values
string

Identifying value for this entity

copy()

DO NOT CALL THIS METHOD! USE copyToLang() OR copyToNode() INSTEAD! Copies data from another Page.

public copy([bool $includeContent = true ][, bool $includeModuleAndCmd = true ][, bool $includeName = true ][, bool $includeMetaData = true ][, bool $includeProtection = true ][, bool $includeEditingStatus = true ][, bool $followRedirects = false ][, bool $followFallbacks = false ][, mixed $page = null ]) : Page
Parameters
$includeContent : bool = true

Whether to copy content. Defaults to true

$includeModuleAndCmd : bool = true

Whether to copy module and cmd. Defaults to true

$includeName : bool = true

Whether to copy title, content title and slug. Defaults to true

$includeMetaData : bool = true

Whether to copy meta data. Defaults to true

$includeProtection : bool = true

Whether to copy protection. Defaults to true

$includeEditingStatus : bool = true

Copy the editing status if true otherwise not

$followRedirects : bool = false

Whether to return a redirection page or the page its pointing at. Defaults to false, which returns the redirection page

$followFallbacks : bool = false

Whether to return a fallback page or the page its pointing at. Defaults to false, witch returns the fallback page

$page : mixed = null
Return values
Page

The copy of $this or null on error

copyProtection()

Clones the protection of this page to another page

public copyProtection(Page $page, bool $frontend) : bool
Parameters
$page : Page

Page to get the same protection as $this

$frontend : bool

Wheter the front- or backend protection should be cloned

Return values
bool

True on success, false otherwise

copyToLang()

Creates a copy of this page with a different language.

public copyToLang(int $destinationLang[, bool $includeContent = true ][, bool $includeModuleAndCmd = true ][, bool $includeName = true ][, bool $includeMetaData = true ][, bool $includeProtection = true ][, bool $includeEditingStatus = true ][, bool $followRedirects = false ][, bool $followFallbacks = false ][, mixed $page = null ]) : Page
Parameters
$destinationLang : int

Language ID to set

$includeContent : bool = true

Whether to copy content. Defaults to true.

$includeModuleAndCmd : bool = true

Whether to copy module and cmd. Defaults to true.

$includeName : bool = true

Whether to copy title, content title and slug. Defaults to true.

$includeMetaData : bool = true

Whether to copy meta data. Defaults to true.

$includeProtection : bool = true

Whether to copy protection. Defaults to true.

$includeEditingStatus : bool = true

Copy the editing status if true otherwise false

$followRedirects : bool = false

Whether to return a redirection page or the page its pointing at. Defaults to false, which returns the redirection page

$followFallbacks : bool = false

Whether to return a fallback page or the page its pointing at. Defaults to false, witch returns the fallback page

$page : mixed = null
Tags
todo

Define what to do if destination lang is not the fallback of $this->getLang() (always follow fallbacks or do not copy content)

Return values
Page

The copy of $this or null on error

copyToNode()

Creates a copy of this page which belongs to another node.

public copyToNode(Node $destinationNode[, bool $includeContent = true ][, bool $includeModuleAndCmd = true ][, bool $includeName = true ][, bool $includeMetaData = true ][, bool $includeProtection = true ][, bool $includeEditingStatus = true ][, bool $followRedirects = false ][, bool $followFallbacks = false ][, mixed $page = null ]) : Page
Parameters
$destinationNode : Node

The other node

$includeContent : bool = true

Whether to copy content. Defaults to true

$includeModuleAndCmd : bool = true

Whether to copy module and cmd. Defaults to true

$includeName : bool = true

Whether to copy title, content title and slug. Defaults to true

$includeMetaData : bool = true

Whether to copy meta data. Defaults to true

$includeProtection : bool = true

Whether to copy protection. Defaults to true

$includeEditingStatus : bool = true

Copy the editing status if true otherwise not

$followRedirects : bool = false

Whether to return a redirection page or the page its pointing at. Defaults to false, which returns the redirection page

$followFallbacks : bool = false

Whether to return a fallback page or the page its pointing at. Defaults to false, witch returns the fallback page

$page : mixed = null
Return values
Page

The copy of $this or null on error

getActive()

Get status

public getActive([bool $disregardScheduledPublishing = false ]) : bool
Parameters
$disregardScheduledPublishing : bool = false
Return values
bool

$status

getAliases()

Returns an array of alias pages for a page

public getAliases() : array<string|int, Page>
Return values
array<string|int, Page>

getApplicationTemplate()

Get applicationTemplate

public getApplicationTemplate() : string
Return values
string

$applicationTemplate

getBackendAccessId()

Get backendAccessId

public getBackendAccessId() : int
Return values
int

$backendAccessId

getCaching()

Get caching

public getCaching() : bool
Return values
bool

$caching

getChangeFrequency()

Returns the change frequency in XY (for use in sitemap or so)

public getChangeFrequency() : string
Tags
todo

do something more sensful than checking for module

Return values
string

'hourly' or 'weekly'

getChildren()

Returns an array of child pages (pages of the same language of all subnodes)

public getChildren() : array<string|int, mixed>
Return values
array<string|int, mixed>

List of page objects

getCmd()

Get cmd

public getCmd() : string
Return values
string

$cmd

getContent()

Get content

public getContent([bool $raw = false ]) : text

Returns the content. If BlockEditor is active for this page and $raw is set to false (default), the parsed HTML is returned.

Parameters
$raw : bool = false

(optional) Whether to return raw data, defaults to false

Return values
text

$content

getContentTitle()

Get contentTitle

public getContentTitle() : string
Return values
string

$contentTitle

getCssName()

Get cssName

public getCssName() : string
Return values
string

$cssName

getCssNavName()

Get cssNavName

public getCssNavName() : string
Return values
string

$cssNavName

getCustomContent()

Get customContent

public getCustomContent() : string
Return values
string

$customContent

getDisplay()

Get display

public getDisplay() : bool
Return values
bool

$display

getEditingStatus()

Get editingStatus

public getEditingStatus() : bool
Return values
bool

$editingStatus

getEnd()

Get end

public getEnd() : date
Return values
date

$end

getFallback()

Returns the fallback page of this page

public getFallback() : Page
Return values
Page

Fallback page or null if none

getFrontendAccessId()

Get frontendAccessId

public getFrontendAccessId() : int
Return values
int

$frontendAccessId

getId()

Get id

public getId() : int
Return values
int

$id

getKeyAsString()

Returns this entity's key

public final getKeyAsString([string $separator = '/' ]) : string

If this entity has a composite key, the fields are separated by $separator.

Parameters
$separator : string = '/'

(optional) Separator for composite key fields, default "/"

Return values
string

Entity key as string

getLang()

Get lang

public getLang() : int
Return values
int

$lang

getLastModificationDateTime()

Returns the DateTime object for the modification time (for use in sitemap or so)

public getLastModificationDateTime() : DateTime
Return values
DateTime

DateTime Object

getLinkTarget()

Get linkTarget

public getLinkTarget() : string
Return values
string

$linkTarget

getMetadesc()

Get metadesc

public getMetadesc() : string
Return values
string

$metadesc

getMetaimage()

Get metaimage

public getMetaimage() : string
Return values
string

$metaimage

getMetakeys()

Get metakeys

public getMetakeys() : string
Return values
string

$metakeys

getMetarobots()

Get metarobots

public getMetarobots() : int
Return values
int

$metarobots

getMetatitle()

Get metatitle

public getMetatitle() : string
Return values
string

$metatitle

getModule()

Get module

public getModule() : string
Tags
todo

Returning an empty string for non-application is non-sense. This must be migrated to a proper association that would return null. See CLX-4198

Return values
string

$module

getNode()

Get node

public getNode() : Node
Return values
Node

$node

getNodeIdShadowed()

Get nodeIdShadowed

public getNodeIdShadowed() : int
Return values
int

$nodeIdShadowed

getParent()

Returns the page with the same language of the parent node e.g. $this->getNode()->getParent()->getPage($this->lang)

public getParent() : Page
Tags
throws
PageException

If parent page can not be found

Return values
Page

getPath()

Get a pages' path starting with a slash

public getPath() : string
Return values
string

path, e.g. '/This/Is/It'

getProtection()

Get protection

public getProtection() : int
Return values
int

$protection

getRelatedBlocks()

Returns the blocks related to this page

public getRelatedBlocks() : array<string|int, mixed>
Return values
array<string|int, mixed>

getSkin()

Get skin

public getSkin() : int
Return values
int

$skin

getSlug()

Get slug

public getSlug() : string
Return values
string

$slug

getSourceMode()

Get sourceMode

public getSourceMode() : int
Return values
int

$sourceMode

getStart()

Get start

public getStart() : date
Return values
date

$start

getStatus()

Get active

public getStatus() : bool
Tags
todo

Move this method to CM!

Return values
bool

$active

getTarget()

Get target

public getTarget() : string
Return values
string

$target

getTargetCmd()

Get the target pages' module cmd

public getTargetCmd() : mixed
Return values
mixed

module cmd if set, otherwise NULL

getTargetLangId()

Get the target pages' language id.

public getTargetLangId() : int
Return values
int

id for set language, 0 if it is not set or external target

getTargetModule()

Get the target pages' module name

public getTargetModule() : mixed
Return values
mixed

module name if set, otherwise NULL

getTargetNodeId()

Gets the target nodes' id.

public getTargetNodeId() : int
Return values
int

id for internal targets, 0 else.

getTargetPage()

Gets the page this page points to

public getTargetPage() : Page
Tags
throws
PageRepositoryException

If $this has no internal target set or the internal target is invalid.

Return values
Page

The page this page points to

getTargetQueryString()

Gets the target pages' querystring.

public getTargetQueryString() : string
Return values
string

querystring for internal targets, null else

getTitle()

Get title

public getTitle() : string
Return values
string

$title

getTranslatedFieldValue()

Returns the value of a translatable field using fallback mechanisms

public getTranslatedFieldValue(string $fieldName) : mixed

If the field is not translatable its value is returned anyway. Tries to return the value in the following locales (if non-empty):

  • Current locale
  • Default locale
  • All other locales
Parameters
$fieldName : string

Name of a translatable field

getType()

Get page type

public getType() : string

Returns one of:

  • static::TYPE_CONTENT
  • static::TYPE_APPLICATION
  • static::TYPE_REDIRECT
  • static::TYPE_SYMLINK
  • static::TYPE_FALLBACK
  • static::TYPE_ALIAS If type is static::TYPE_APPLICATION, but static::$module refers to a non-existing component, then static::TYPE_CONTENT will be returned instead.
Return values
string

$type

getUpdatedAt()

Get updatedAt

public getUpdatedAt() : datetime
Return values
datetime

$updatedAt

getUpdatedBy()

Get updatedBy

public getUpdatedBy() : string
Return values
string

$updatedBy

getURL()

Returns "$protocolAndDomainWithPathOffset/link/to/page$params.

public getURL(mixed $protocolAndDomainWithPathOffset, string $params) : mixed

Notice that there is no trailing slash inserted after the link. If you need one, prepend it to $params.

Parameters
$protocolAndDomainWithPathOffset : mixed
$params : string

'?a=b'

getUseCustomApplicationTemplateForAllChannels()

Get useCustomApplicationTemplateForAllChannels

public getUseCustomApplicationTemplateForAllChannels() : int
Return values
int

$useCustomApplicationTemplateForAllChannels

getUseCustomContentForAllChannels()

Get useCustomContentForAllChannels

public getUseCustomContentForAllChannels() : int
Return values
int

$useCustomContentForAllChannels

getUseSkinForAllChannels()

Get useSkinForAllChannels

public getUseSkinForAllChannels() : int
Return values
int

$useSkinForAllChannels

getVersion()

Returns the current log for this page

public getVersion() : LogEntry
Return values
LogEntry

Current page log

getWidgetContent()

Returns the content for a widget

public getWidgetContent(string $widgetName, Theme $theme, Page $page, mixed $channel) : Sigma
Parameters
$widgetName : string
$theme : Theme

Theme which is parsed

$page : Page

Page which is parsed

$channel : mixed
Return values
Sigma

Widget content

getWidgetContentAttributeName()

Returns the name of the attribute used to parse Widget named $widgetName

public getWidgetContentAttributeName(mixed $widgetName) : string
Parameters
$widgetName : mixed
Return values
string

Attribute name used as getter name

initializeValidators()

Set $this->validators

public initializeValidators() : mixed
Tags
inheritDoc

isActive()

Alias for getActive()

public isActive([bool $disregardScheduledPublishing = false ][, bool $resolveTarget = true ]) : bool
Parameters
$disregardScheduledPublishing : bool = false
$resolveTarget : bool = true
Return values
bool

isBackendProtected()

Whether page access from backend is protected.

public isBackendProtected() : bool
Return values
bool

isDraft()

Checks whether the page is a draft or not

public isDraft() : bool
Return values
bool

true if the page is currently a draft

isFrontendProtected()

Whether page access from frontend is protected.

public isFrontendProtected() : bool
Return values
bool

isTargetInternal()

Whether target references an internal page

public isTargetInternal() : bool
Return values
bool

isVirtual()

Whether the Page is intended to exist in DB or not.

public isVirtual() : bool
Return values
bool

isVisible()

Alias for getDisplay()

public isVisible() : bool
Return values
bool

setActive()

Set active

public setActive(bool $active) : mixed
Parameters
$active : bool

setAlias()

Stores changes to the aliases for this page

public setAlias(mixed $data) : mixed
Parameters
$data : mixed

setApplicationTemplate()

Set applicationTemplate

public setApplicationTemplate(string $applicationTemplate) : mixed
Parameters
$applicationTemplate : string

setBackendAccessId()

Set backendAccessId

public setBackendAccessId(int $backendAccessId) : mixed
Parameters
$backendAccessId : int

setBackendProtection()

Set the Page backend protection

public setBackendProtection(bool $enable[, bool $ignorePermission = false ]) : void
Parameters
$enable : bool
$ignorePermission : bool = false

Set true for testing only

setCaching()

Set caching

public setCaching(bool $caching) : mixed
Parameters
$caching : bool

setCmd()

Set cmd

public setCmd(string $cmd) : mixed
Parameters
$cmd : string

setContent()

Set content

public setContent(text $content) : mixed
Parameters
$content : text

setContentOf()

Copies the content from the other page given.

public setContentOf(Page $page[, bool $includeThemeOptions = false ][, bool $includeSeoOptions = false ]) : mixed
Parameters
$page : Page
$includeThemeOptions : bool = false

Adopt theme options if true

$includeSeoOptions : bool = false

Adopt SEO options if true

setContentTitle()

Set contentTitle

public setContentTitle(string $contentTitle) : mixed
Parameters
$contentTitle : string

setCssName()

Set cssName

public setCssName(string $cssName) : mixed
Parameters
$cssName : string

setCssNavName()

Set cssNavName

public setCssNavName(string $cssNavName) : mixed
Parameters
$cssNavName : string

setCustomContent()

Set customContent

public setCustomContent(string $customContent) : mixed
Parameters
$customContent : string

setDisplay()

Set display

public setDisplay(bool $display) : mixed
Parameters
$display : bool

setEditingStatus()

Set editingStatus

public setEditingStatus(bool $editingStatus) : mixed
Parameters
$editingStatus : bool

setEnd()

Set end

public setEnd(date $end) : mixed
Parameters
$end : date

setFrontendAccessId()

Set frontendAccessId

public setFrontendAccessId(int $frontendAccessId) : mixed
Parameters
$frontendAccessId : int

setFrontendProtection()

Set the Page frontend protection

public setFrontendProtection(bool $enable[, bool $ignorePermission = false ]) : void
Parameters
$enable : bool
$ignorePermission : bool = false

Set true for testing only

setId()

Set id

public setId(int $id) : mixed
Parameters
$id : int

setLang()

Set lang

public setLang(int $lang) : mixed
Parameters
$lang : int

setLinkTarget()

Set linkTarget

public setLinkTarget(string $linkTarget) : mixed
Parameters
$linkTarget : string

setMetadesc()

Set metadesc

public setMetadesc(string $metadesc) : mixed
Parameters
$metadesc : string

setMetaimage()

Set metaimage

public setMetaimage(string $metaimage) : mixed
Parameters
$metaimage : string

setMetakeys()

Set metakeys

public setMetakeys(string $metakeys) : mixed
Parameters
$metakeys : string

setMetarobots()

Set metarobots

public setMetarobots(string $metarobots) : mixed
Parameters
$metarobots : string

setMetatitle()

Set metatitle

public setMetatitle(string $metatitle) : mixed
Parameters
$metatitle : string

setModule()

Set module

public setModule([string $module = '' ]) : mixed
Parameters
$module : string = ''
Tags
todo

Drop $module verification here. Instead implement proper model association to SystemComponent

todo

Setting {static::$module} to an empty string is non-sense. This property must be migrated to a proper association. See CLX-4198

throws
PageException

In case $module does not refer to an existing component name.

setNode()

Set node

public setNode(Node $node) : mixed
Parameters
$node : Node

setNodeIdShadowed()

Set nodeIdShadowed

public setNodeIdShadowed(int $nodeIdShadowed) : mixed
Parameters
$nodeIdShadowed : int

setProtection()

Set protection

public setProtection(int $protection) : mixed
Parameters
$protection : int

setRelatedBlocks()

Sets relations to blocks

public setRelatedBlocks(array<string|int, mixed> $relatedBlocks) : mixed
Parameters
$relatedBlocks : array<string|int, mixed>

list of block IDs

setSkin()

Set skin

public setSkin(int $skin) : mixed
Parameters
$skin : int

setSlug()

Set slug

public setSlug(string $slug[, bool $nextSlugCall = false ]) : mixed
Parameters
$slug : string
$nextSlugCall : bool = false

set by { @see nextSlug() }

setSourceMode()

Set sourceMode

public setSourceMode(int $sourceMode) : mixed
Parameters
$sourceMode : int

setStart()

Set start

public setStart(date $start) : mixed
Parameters
$start : date

setStatus()

Set status

public setStatus(bool $status) : mixed
Parameters
$status : bool

setTarget()

Set target

public setTarget(string $target) : mixed
Parameters
$target : string

setTitle()

Set title

public setTitle(string $title) : mixed
Parameters
$title : string

setType()

Set type

public setType(string $type) : mixed
Parameters
$type : string

setUpdatedAt()

Set updatedAt

public setUpdatedAt(datetime $updatedAt) : mixed
Parameters
$updatedAt : datetime

setUpdatedAtToNow()

public setUpdatedAtToNow() : mixed

setUpdatedBy()

Set updatedBy

public setUpdatedBy(string $updatedBy) : mixed
Parameters
$updatedBy : string

setUseCustomApplicationTemplateForAllChannels()

Get useCustomApplicationTemplateForAllChannels

public setUseCustomApplicationTemplateForAllChannels(mixed $useCustomApplicationTemplateForAllChannels) : int
Parameters
$useCustomApplicationTemplateForAllChannels : mixed
Return values
int

$useCustomApplicationTemplateForAllChannels

setUseCustomContentForAllChannels()

Get useCustomContentForAllChannels

public setUseCustomContentForAllChannels(mixed $useCustomContentForAllChannels) : int
Parameters
$useCustomContentForAllChannels : mixed
Return values
int

$useCustomContentForAllChannels

setUseSkinForAllChannels()

Set useSkinForAllChannels

public setUseSkinForAllChannels(mixed $useSkinForAllChannels) : int
Parameters
$useSkinForAllChannels : mixed
Return values
int

$useSkinForAllChannels

setVirtual()

Sets this pages virtual flag

public setVirtual([bool $virtual = true ]) : mixed
Parameters
$virtual : bool = true

titleExists()

Check whether the page $title already exists under the pages in $parentNode

public titleExists(Node $parentNode, int $lang, string $title) : bool
Parameters
$parentNode : Node

Parent node object

$lang : int

Language ID

$title : string

Page title

Return values
bool

Return true if the page title exists, otherwise false

translate()

Translate the page into an other locale

public translate(int $targetLang[, bool $publish = true ][, bool|null $persist = true ]) : mixed

This will translate the current page (along with all its parents) into the target locale $targetLang by applying the fallback rules.

Parameters
$targetLang : int

ID of target Locale

$publish : bool = true

Set to false to not publish any newly created pages.

$persist : bool|null = true

updateFromArray()

public updateFromArray(mixed $newData) : mixed
Parameters
$newData : mixed

validate()

public validate() : mixed
Tags
prePersist
onFlush

createAccessId()

protected createAccessId() : mixed

eraseAccessId()

protected eraseAccessId(mixed $id) : mixed
Parameters
$id : mixed

getContentTemplateForWidget()

Returns the template in which the widget can be used

protected getContentTemplateForWidget(mixed $widgetName, mixed $langId, mixed $page, mixed $channel) : Sigma
Parameters
$widgetName : mixed

Name of the Widget to get template for

$langId : mixed

Language ID

$page : mixed

Current page

$channel : mixed

Current channel

Return values
Sigma

Template which may contain the widget

getFallbackLocaleCodes()

Returns a list of all locale codes ordered by fallback order

protected getFallbackLocaleCodes() : array<string|int, mixed>
  • First entry is the current locale
  • Second entry is the default locale (if different from current, it's omitted otherwise)
  • Then all other locales follow (in no particular order)
Tags
todo

Order the array by the fallback order (same as in ContentManager)

Return values
array<string|int, mixed>

List of locale codes

getStringRepresentationBlank()

Whether blank string representations are valid

protected getStringRepresentationBlank() : bool
Return values
bool

Whether blank string representations are valid

getStringRepresentationFields()

Returns a list of fields available in the string representation

protected getStringRepresentationFields() : array<string|int, mixed>
Return values
array<string|int, mixed>

List of field names

getStringRepresentationFormat()

Returns the sprintf() format for the string representation

protected getStringRepresentationFormat() : string
Return values
string

sprintf() format string

isSetModuleValid()

Verify if the set name in {@see static::$module} is a valid component name.

protected isSetModuleValid() : bool
Return values
bool

True of static::$module refers to an existing component

refreshSlug()

Sets a correct slug based on the current title.

protected refreshSlug() : mixed

The result may need a suffix if titles of pages on sibling nodes result in the same slug.

slugify()

protected slugify(mixed $string) : mixed
Parameters
$string : mixed

validateSlugForTopLevelUsage()

Validates the slug for top level usage.

protected validateSlugForTopLevelUsage() : void

This method checks if the slug is valid for top level usage by ensuring that it doesn't conflict with system folder names, installed locales or any other constraints. If the slug conflicts with any of the constraints, a ValidationException will be thrown with an appropriate user friendly error message.

Tags
throws
ValidationException

If the slug is invalid for top level usage


        
On this page

Search results