Node

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() 

Add children

addChildren(\Cx\Core\ContentManager\Model\Entity\Node $children) 

Parameters

$children

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

Add a page

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

Parameters

$page

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

addParsedChild()

addParsedChild(\Cx\Core\ContentManager\Model\Entity\Node $child) 

Parameters

$child

Creates a copy of this node including its pages

copy(boolean $recursive, \Cx\Core\ContentManager\Model\Entity\Node $newParent, boolean $persist) : \Cx\Core\ContentManager\Model\Entity\Node

This does not persist anything.

todo This is untested!

Parameters

$recursive

boolean

(optional) Wheter copy all children to the new node or not, default false

$newParent

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

(optional) New parent node for the copy, default is parent of this

$persist

boolean

(optional) Wheter to persist new entities or not, default true, if set to false, be sure to persist everything

Returns

Get children

getChildren($lang) : \Cx\Core\ContentManager\Model\Entity\Doctrine\Common\Collections\Collection

Parameters

$lang

Returns

\Cx\Core\ContentManager\Model\Entity\Doctrine\Common\Collections\Collection$children

Get id

getId() : integer

Returns

integer$id

Get lft

getLft() : integer

Returns

integer$lft

Get lvl

getLvl() : integer

Returns

integer$lvl

Get a certain Page

getPage(integer $lang) : \Cx\Core\ContentManager\Model\Entity\Page

Parameters

$lang

integer

Returns

Get pages

getPages($inactive_langs, $aliases) : \Cx\Core\ContentManager\Model\Entity\Doctrine\Common\Collections\Collection

Parameters

$inactive_langs

$aliases

Returns

\Cx\Core\ContentManager\Model\Entity\Doctrine\Common\Collections\Collection$pages

getPagesByLang()

getPagesByLang($inactive_langs) 

Parameters

$inactive_langs

Get parent

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

Returns

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

Get rgt

getRgt() : integer

Returns

integer$rgt

Returns an unique identifier that is usable even if no id is set yet.

getUniqueIdentifier() : string

The Cx\Model\Events\PageEventListener uses this.

Returns

string

Check whether the current user has access to this node.

hasAccessByUserId(boolean $frontend) : boolean

Parameters

$frontend

boolean

whether front- or backend. defaults to frontend

Returns

boolean

serialize()

serialize() 

Set id

setId(integer $id) 

Parameters

$id

integer

Set lft

setLft(integer $lft) 

Parameters

$lft

integer

Set lvl

setLvl(integer $lvl) 

Parameters

$lvl

integer

Set parent

setParent(\Cx\Core\ContentManager\Model\Entity\Node $parent) 

Parameters

$parent

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

Set rgt

setRgt(integer $rgt) 

Parameters

$rgt

integer

Creates a translated page in this node

translatePage(boolean $activate, int $targetLang) 

Does not flush EntityManager.

returns \Cx\Core\ContentManager\Model\Entity\Page the copy

Parameters

$activate

boolean

whether the new page should be activated

$targetLang

int

target language id

unserialize()

unserialize($data) 

Parameters

$data

validate()

validate() 
prePersist

Exceptions

\Cx\Model\Base\ValidationException

 Properties

 

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

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

$id : integer
 

$instance 
 

$instanceCounter 
 

$lft : integer
 

$lvl : integer
 

$pages : \Cx\Core\ContentManager\Model\Entity\Cx\Core\ContentManager\Model\Entity\Page
 

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

$rgt : integer
© Copyright 2014 by Comvation AG
Generated on 2014-07-11T08:39:22+02:00.