Page

See EntityBase::$validators if you want to subclass it.

copyright CONTREXX CMS - COMVATION AG
author COMVATION Development Team
package contrexx
subpackage model_contentmanager

 Methods

__construct()

__construct() 

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

copy(boolean $includeContent, boolean $includeModuleAndCmd, boolean $includeName, boolean $includeMetaData, boolean $includeProtection, boolean $followRedirects, boolean $followFallbacks, \Cx\Core\ContentManager\Model\Entity\Page $page) : \Cx\Core\ContentManager\Model\Entity\Page

Parameters

$includeContent

boolean

Whether to copy content. Defaults to true.

$includeModuleAndCmd

boolean

Whether to copy module and cmd. Defaults to true.

$includeName

boolean

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

$includeMetaData

boolean

Wheter to copy meta data. Defaults to true.

$includeProtection

boolean

Wheter to copy protection. Defaults to true.

$followRedirects

boolean

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

$followFallbacks

boolean

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

$page

\Cx\Core\ContentManager\Model\Entity\Page

Page to use as target

Returns

\Cx\Core\ContentManager\Model\Entity\PageThe copy of $this or null on error

Clones the protection of this page to another page

copyProtection(\Cx\Core\ContentManager\Model\Entity\Page $page, boolean $frontend) : boolean

Parameters

$page

\Cx\Core\ContentManager\Model\Entity\Page

Page to get the same protection as $this

$frontend

boolean

Wheter the front- or backend protection should be cloned

Returns

booleanTrue on success, false otherwise

Creates a copy of this page with a different language.

copyToLang(int $destinationLang, boolean $includeContent, boolean $includeModuleAndCmd, boolean $includeName, boolean $includeMetaData, boolean $includeProtection, boolean $followRedirects, boolean $followFallbacks, \Cx\Core\ContentManager\Model\Entity\Page $page) : \Cx\Core\ContentManager\Model\Entity\Page
todo Define what to do if destination lang is not the fallback of $this->getLang() (always follow fallbacks or do not copy content)

Parameters

$destinationLang

int

Language ID to set

$includeContent

boolean

Whether to copy content. Defaults to true.

$includeModuleAndCmd

boolean

Whether to copy module and cmd. Defaults to true.

$includeName

boolean

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

$includeMetaData

boolean

Wheter to copy meta data. Defaults to true.

$includeProtection

boolean

Wheter to copy protection. Defaults to true.

$followRedirects

boolean

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

$followFallbacks

boolean

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

$page

\Cx\Core\ContentManager\Model\Entity\Page

Page to use as target

Returns

\Cx\Core\ContentManager\Model\Entity\PageThe copy of $this or null on error

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

copyToNode(\Cx\Core\ContentManager\Model\Entity\Node $destinationNode, boolean $includeContent, boolean $includeModuleAndCmd, boolean $includeName, boolean $includeMetaData, boolean $includeProtection, boolean $followRedirects, boolean $followFallbacks, \Cx\Core\ContentManager\Model\Entity\Page $page) : \Cx\Core\ContentManager\Model\Entity\Page

Parameters

$destinationNode

\Cx\Core\ContentManager\Model\Entity\Node

The other node

$includeContent

boolean

Whether to copy content. Defaults to true.

$includeModuleAndCmd

boolean

Whether to copy module and cmd. Defaults to true.

$includeName

boolean

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

$includeMetaData

boolean

Wheter to copy meta data. Defaults to true.

$includeProtection

boolean

Wheter to copy protection. Defaults to true.

$followRedirects

boolean

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

$followFallbacks

boolean

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

$page

\Cx\Core\ContentManager\Model\Entity\Page

Page to use as target

Returns

\Cx\Core\ContentManager\Model\Entity\PageThe copy of $this or null on error

Get status

getActive(boolean $disregardScheduledPublishing) : boolean

Parameters

$disregardScheduledPublishing

boolean

Returns

boolean$status

Returns an array of alias pages for a page

getAliases() : \Cx\Core\ContentManager\Model\Entity\Array<Cx\Core\ContentManager\Model\Entity\Page>

Returns

\Cx\Core\ContentManager\Model\Entity\Array<Cx\Core\ContentManager\Model\Entity\Page>

Get backendAccessId

getBackendAccessId() : integer

Returns

integer$backendAccessId

Get caching

getCaching() : boolean

Returns

boolean$caching

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

getChangeFrequency() : string
todo do something more sensful than checking for module

Returns

string'hourly' or 'weekly'

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

getChildren() : array

Returns

arrayList of page objects

Get cmd

getCmd() : string

Returns

string$cmd

Get content

getContent() : \Cx\Core\ContentManager\Model\Entity\text

Returns

\Cx\Core\ContentManager\Model\Entity\text$content

Get contentTitle

getContentTitle() : string

Returns

string$contentTitle

Get cssName

getCssName() : string

Returns

string$cssName

Get cssNavName

getCssNavName() : string

Returns

string$cssNavName

Get customContent

getCustomContent() : string

Returns

string$customContent

Get display

getDisplay() : boolean

Returns

boolean$display

Get editingStatus

getEditingStatus() : boolean

Returns

boolean$editingStatus

Get end

getEnd() : \Cx\Core\ContentManager\Model\Entity\date

Returns

\Cx\Core\ContentManager\Model\Entity\date$end

Returns the fallback page of this page

getFallback() : \Cx\Core\ContentManager\Model\Entity\Page

Returns

\Cx\Core\ContentManager\Model\Entity\PageFallback page or null if none

Copies the content from the other page given.

getFallbackContentFrom(\Cx\Core\ContentManager\Model\Entity\Page $page) 

Get frontendAccessId

getFrontendAccessId() : integer

Returns

integer$frontendAccessId

Get id

getId() : integer

Returns

integer$id

Get lang

getLang() : integer

Returns

integer$lang

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

getLastModificationDateTime() : \DateTime

Returns

\DateTimeDateTime Object

Get linkTarget

getLinkTarget() : string

Returns

string$linkTarget

Get metadesc

getMetadesc() : string

Returns

string$metadesc

Get metakeys

getMetakeys() : string

Returns

string$metakeys

Get metarobots

getMetarobots() : int

Returns

int$metarobots

Get metatitle

getMetatitle() : string

Returns

string$metatitle

Get module

getModule() : integer

Returns

integer$module

Get node

getNode() : \Cx\Core\ContentManager\Model\Entity\Cx\Core\ContentManager\Model\Entity\Node

Returns

\Cx\Core\ContentManager\Model\Entity\Cx\Core\ContentManager\Model\Entity\Node$node

Get nodeIdShadowed

getNodeIdShadowed() : integer

Returns

integer$nodeIdShadowed

Returns the page with the same language of the parent node e.g.

getParent() : \Cx\Core\ContentManager\Model\Entity\Page

$this->getNode()->getParent()->getPage($this->lang)

Exceptions

\Cx\Core\ContentManager\Model\Entity\PageException If parent page can not be found

Returns

Get a pages' path starting with a slash

getPath() : string

Returns

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

Get protection

getProtection() : integer

Returns

integer$protection

Returns the blocks related to this page

getRelatedBlocks() : array

Returns

array

Get skin

getSkin() : \Cx\Core\ContentManager\Model\Entity\Cx\Core\ContentManager\Model\Entity\Skin

Returns

\Cx\Core\ContentManager\Model\Entity\Cx\Core\ContentManager\Model\Entity\Skin$skin

Get slug

getSlug() : string

Returns

string$slug

Get sourceMode

getSourceMode() : boolean

Returns

boolean$sourceMode

Get start

getStart() : \Cx\Core\ContentManager\Model\Entity\date

Returns

\Cx\Core\ContentManager\Model\Entity\date$start

Get active

getStatus() : boolean
todo Move this method to CM!

Returns

boolean$active

Get target

getTarget() : string

Returns

string$target

Get the target pages' module cmd

getTargetCmd() : mixed

Returns

mixedmodule cmd if set, otherwise NULL

Get the target pages' language id.

getTargetLangId() : integer

Returns

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

Get the target pages' module name

getTargetModule() : mixed

Returns

mixedmodule name if set, otherwise NULL

Gets the target nodes' id.

getTargetNodeId() : integer

Returns

integerid for internal targets, 0 else.

Gets the target pages' querystring.

getTargetQueryString() : string

Returns

stringquerystring for internal targets, null else

Get title

getTitle() : string

Returns

string$title

Get type

getType() : string

Returns

string$type

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

getURL($protocolAndDomainWithPathOffset, string $params) 

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

Parameters

$protocolAndDomainWithPathOffset

$params

string

'?a=b'

Get updatedAt

getUpdatedAt() : \Cx\Core\ContentManager\Model\Entity\datetime

Returns

\Cx\Core\ContentManager\Model\Entity\datetime$updatedAt

Get updatedBy

getUpdatedBy() : string

Returns

string$updatedBy

Get useCustomContentForAllChannels

getUseCustomContentForAllChannels() : integer

Returns

integer$useCustomContentForAllChannels

Get useSkinForAllChannels

getUseSkinForAllChannels() : integer

Returns

integer$useSkinForAllChannels

Returns the current log for this page

getVersion() : \Cx\Core\ContentManager\Model\Entity\LogEntry

Alias for getActive()

isActive(boolean $disregardScheduledPublishing) : boolean

Parameters

$disregardScheduledPublishing

boolean

Returns

boolean

Whether page access from backend is protected.

isBackendProtected() : boolean

Returns

boolean

Checks whether the page is a draft or not

isDraft() : bool

Returns

booltrue if the page is currently a draft

Whether page access from frontend is protected.

isFrontendProtected() : boolean

Returns

boolean

Whether target references an internal page

isTargetInternal() : boolean

Returns

boolean

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

isVirtual() : boolean

Returns

boolean

Alias for getDisplay()

isVisible() : boolean

Returns

boolean

nextSlug()

nextSlug() 

serialize()

serialize() 

Set active

setActive(boolean $active) 

Parameters

$active

boolean

Stores changes to the aliases for this page

setAlias(Array $data) 

Parameters

$data

Array

List of alias slugs

Set backendAccessId

setBackendAccessId(integer $backendAccessId) 

Parameters

$backendAccessId

integer

Set page protection in backend.

setBackendProtection(boolean $enabled) 

Parameters

$enabled

boolean

Set caching

setCaching(boolean $caching) 

Parameters

$caching

boolean

Set cmd

setCmd(string $cmd) 

Parameters

$cmd

string

Set content

setContent(\Cx\Core\ContentManager\Model\Entity\text $content) 

Parameters

$content

\Cx\Core\ContentManager\Model\Entity\text

Set contentTitle

setContentTitle(string $contentTitle) 

Parameters

$contentTitle

string

Set cssName

setCssName(string $cssName) 

Parameters

$cssName

string

Set cssNavName

setCssNavName(string $cssNavName) 

Parameters

$cssNavName

string

Set customContent

setCustomContent(string $customContent) 

Parameters

$customContent

string

Set display

setDisplay(boolean $display) 

Parameters

$display

boolean

Set editingStatus

setEditingStatus(boolean $editingStatus) 

Parameters

$editingStatus

boolean

Set end

setEnd(\Cx\Core\ContentManager\Model\Entity\date $end) 

Parameters

$end

\Cx\Core\ContentManager\Model\Entity\date

Set frontendAccessId

setFrontendAccessId(integer $frontendAccessId) 

Parameters

$frontendAccessId

integer

Set page protection in frontend.

setFrontendProtection(boolean $enabled) 

Parameters

$enabled

boolean

Set id

setId(integer $id) 

Parameters

$id

integer

Set lang

setLang(integer $lang) 

Parameters

$lang

integer

Set linkTarget

setLinkTarget(string $linkTarget) 

Parameters

$linkTarget

string

Set metadesc

setMetadesc(string $metadesc) 

Parameters

$metadesc

string

Set metakeys

setMetakeys(string $metakeys) 

Parameters

$metakeys

string

Set metarobots

setMetarobots(string $metarobots) 

Parameters

$metarobots

string

Set metatitle

setMetatitle(string $metatitle) 

Parameters

$metatitle

string

Set module

setModule(integer $module) 

Parameters

$module

integer

Set node

setNode(\Cx\Core\ContentManager\Model\Entity\Node $node) 

Parameters

$node

\Cx\Core\ContentManager\Model\Entity\Cx\Core\ContentManager\Model\Entity\Node

Set nodeIdShadowed

setNodeIdShadowed(integer $nodeIdShadowed) 

Parameters

$nodeIdShadowed

integer

Set protection

setProtection(integer $protection) 

Parameters

$protection

integer

Sets relations to blocks

setRelatedBlocks(array $relatedBlocks) 

Parameters

$relatedBlocks

array

list of block IDs

Set skin

setSkin(\Cx\Core\ContentManager\Model\Entity\Cx\Core\ContentManager\Model\Entity\Skin $skin) 

Parameters

$skin

\Cx\Core\ContentManager\Model\Entity\Cx\Core\ContentManager\Model\Entity\Skin

Set slug

setSlug(string $slug, boolean $nextSlugCall) 

Parameters

$slug

string

$nextSlugCall

boolean

set by { @see nextSlug() }

Set sourceMode

setSourceMode(boolean $sourceMode) 

Parameters

$sourceMode

boolean

Set start

setStart(\Cx\Core\ContentManager\Model\Entity\date $start) 

Parameters

$start

\Cx\Core\ContentManager\Model\Entity\date

Set status

setStatus(boolean $status) 

Parameters

$status

boolean

Set target

setTarget(string $target) 

Parameters

$target

string

Set title

setTitle(string $title) 

Parameters

$title

string

Set type

setType(string $type) 

Parameters

$type

string

Set updatedAt

setUpdatedAt(\Cx\Core\ContentManager\Model\Entity\datetime $updatedAt) 

Parameters

$updatedAt

\Cx\Core\ContentManager\Model\Entity\datetime

setUpdatedAtToNow()

setUpdatedAtToNow() 

Set updatedBy

setUpdatedBy(string $updatedBy) 

Parameters

$updatedBy

string

Get useCustomContentForAllChannels

setUseCustomContentForAllChannels($useCustomContentForAllChannels) : integer

Parameters

$useCustomContentForAllChannels

Returns

integer$useCustomContentForAllChannels

Set useSkinForAllChannels

setUseSkinForAllChannels($useSkinForAllChannels) : integer

Parameters

$useSkinForAllChannels

Returns

integer$useSkinForAllChannels

Sets this pages virtual flag

setVirtual(boolean $virtual) 

Parameters

$virtual

boolean

Sanitize tree.

setupPath(int $targetLang) : \Cx\Core\ContentManager\Model\Entity\type

Translates all missing parent pages in the desired language

Parameters

$targetLang

int

Language ID of the branch to sanitize

Returns

\Cx\Core\ContentManager\Model\Entity\type

unserialize()

unserialize($data) 

Parameters

$data

updateFromArray()

updateFromArray($newData) 

Parameters

$newData

validate()

validate() 
prePersist
onFlush

Exceptions

\Cx\Model\Base\ValidationException

createAccessId()

createAccessId() 

cutTarget()

cutTarget() 

eraseAccessId()

eraseAccessId($id) 

Parameters

$id

Sets a correct slug based on the current title.

refreshSlug() 

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

slugify()

slugify($string) 

Parameters

$string

 Properties

 

$active : boolean
 

$backendAccessId : integer
 

$cmd : string
 

$content : \Cx\Core\ContentManager\Model\Entity\text
 

$contentTitle : string
 

$cssName : string
 

$cssNavName : string
 

$customContent : string
 

$display : boolean
 

$editingStatus : boolean
 

$end : \Cx\Core\ContentManager\Model\Entity\date
 

$frontendAccessId : integer
 

$id : integer
 

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

$isVirtual : boolean
 

$lang : integer
 

$linkTarget : string
 

$metadesc : string
 

$metakeys : string
 

$metarobots : string
 

$metatitle : string
 

$module : integer
 

$node : \Cx\Core\ContentManager\Model\Entity\Cx\Core\ContentManager\Model\Entity\Node
 

$nodeIdShadowed : integer
 

$protection : integer
 

$skin : \Cx\Core\ContentManager\Model\Entity\Cx\Core\ContentManager\Model\Entity\Skin
 

$slug : string
 

$slugBase : int
 

$slugSuffix : int
 

$sourceMode : boolean
 

$start : \Cx\Core\ContentManager\Model\Entity\date
 

$target : string
 

$title : string
 

$type : string
 

$updatedAt : \Cx\Core\ContentManager\Model\Entity\datetime
 

$updatedBy : string
 

$useCustomContentForAllChannels : integer
 

$useSkinForAllChannels : integer
 

$validators : array
Inherited
inherited_from \Cx\Model\Base\EntityBase::$$validators
 

$caching : boolean

 Constants

 

Node Url regular expression back reference index for the module cmd

NODE_URL_CMD 
deprecated Use NodePlaceholder::... directly instead
 

Node Url regular expression back reference index for the language id

NODE_URL_LANG_ID 
deprecated Use NodePlaceholder::... directly instead
 

Node Url regular expression back reference index for the module

NODE_URL_MODULE 
deprecated Use NodePlaceholder::... directly instead
 

Node Url regular expression back reference index for the node id

NODE_URL_NODE_ID 
deprecated Use NodePlaceholder::... directly instead
 

Regular expression to match a node-url in placeholder notation

NODE_URL_PCRE 
deprecated Use NodePlaceholder::... directly instead
 

Node Url regular expression back reference index for the whole placeholder

NODE_URL_PLACEHOLDER 
deprecated Use NodePlaceholder::... directly instead
 

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

PLACEHOLDER_PREFIX 
deprecated Use NodePlaceholder::... directly instead
 

TYPE_ALIAS

TYPE_ALIAS 
 

TYPE_APPLICATION

TYPE_APPLICATION 
 

TYPE_CONTENT

TYPE_CONTENT 
 

TYPE_FALLBACK

TYPE_FALLBACK 
 

TYPE_REDIRECT

TYPE_REDIRECT 
© Copyright 2014 by Comvation AG
Generated on 2014-07-11T08:39:23+02:00.