class Node extends AbstractDateTimedPositioned implements LeafInterface (View source)

Node entities are the central feature of RZ-CMS, it describes a document-like object which can be inherited with NodesSources to create complex data structures.

Traits

Trait which describe a positioned entity
Trait which describe a positioned entity

Constants

DRAFT

PENDING

PUBLISHED

ARCHIVED

DELETED

Properties

protected $id from AbstractEntity
protected DateTime $createdAt from AbstractDateTimed
protected DateTime $updatedAt from AbstractDateTimed
protected $position from AbstractDateTimedPositioned
protected $dynamicNodeName
protected $hideChildren
protected Node $parent
protected ArrayCollection $children
protected ArrayCollection $bNodes
protected ArrayCollection $aNodes

Methods

int
getId()

No description

setId(int $id)

No description

getCreatedAt()

No description

setCreatedAt(DateTime $createdAt)

No description

getUpdatedAt()

No description

setUpdatedAt(DateTime $updatedAt)

No description

preUpdate()

No description

prePersist()

No description

resetDates()

Set creation and update date to now.

float
getPosition()

No description

$this
setPosition(float $newPosition)

Set position as a float to enable increment and decrement by O.5 to insert a node between two others.

Collection
getChildren()

No description

from LeafTrait
$this
addChild(LeafInterface $child)

No description

from LeafTrait
$this
removeChild(LeafInterface $child)

No description

from LeafTrait
getParent()

No description

from LeafTrait
$this
setParent(LeafInterface $parent = null)

No description

from LeafTrait
getParents()

Return every tag’s parents.

from LeafTrait
int
getDepth()

Gets the nodes depth.

from LeafTrait
getIterator()

{@inheritdoc}

from LeafTrait
count()

{@inheritdoc}

from LeafTrait
static string
getStatusLabel(int $status)

No description

string
getNodeName()

No description

$this
setNodeName(string $nodeName)

No description

boolean
isDynamicNodeName()

Dynamic node name will be updated against default translated nodeSource title at each save.

$this
setDynamicNodeName(boolean $dynamicNodeName)

No description

boolean
isHome()

No description

$this
setHome(boolean $home)

No description

boolean
isVisible()

No description

$this
setVisible(boolean $visible)

No description

int
getStatus()

No description

$this
setStatus(int $status)

No description

boolean
isPublished()

No description

boolean
isPending()

No description

boolean
isDraft()

No description

boolean
isDeleted()

No description

$this
setPublished(boolean $published)

No description

$this
setPending(boolean $pending)

No description

boolean
isLocked()

No description

$this
setLocked(boolean $locked)

No description

integer
getPriority()

No description

$this
setPriority(integer $priority)

No description

mixed
getHideChildren()

No description

setHideChildren(mixed $hideChildren)

No description

boolean
isHidingChildren()

No description

$this
setHidingChildren(boolean $hideChildren)

No description

boolean
isArchived()

No description

$this
setArchived(boolean $archived)

No description

boolean
isSterile()

No description

$this
setSterile(boolean $sterile)

No description

string
getChildrenOrder()

No description

$this
setChildrenOrder(string $childrenOrder)

No description

string
getChildrenOrderDirection()

No description

$this
setChildrenOrderDirection(string $childrenOrderDirection)

No description

getNodeType()

No description

$this
setNodeType(NodeType $nodeType = null)

No description

ArrayCollection
getTags()

No description

$this
removeTag(Tag $tag)

No description

$this
addTag(Tag $tag)

No description

ArrayCollection
getCustomForms()

No description

ArrayCollection
getStackTypes()

No description

$this
removeStackType(NodeType $stackType)

No description

$this
addStackType(NodeType $stackType)

No description

ArrayCollection
getNodeSources()

No description

Collection
getNodeSourcesByTranslation(Translation $translation)

Get node-sources using a given translation.

$this
removeNodeSources(NodesSources $ns)

No description

$this
addNodeSources(NodesSources $ns)

No description

ArrayCollection
getBNodes()

Return nodes related to this (B nodes).

ArrayCollection
getANodes()

Return nodes which own a relation with this (A nodes).

__construct(NodeType $nodeType = null)

Create a new empty Node according to given node-type.

string
getOneLineSummary()

No description

string
getOneLineSourceSummary()

No description

__clone()

After clone method.

string
__toString()

No description

Details

int getId()

Return Value

int

AbstractEntity setId(int $id)

Parameters

int $id

Return Value

AbstractEntity

DateTime getCreatedAt()

Return Value

DateTime

AbstractDateTimed setCreatedAt(DateTime $createdAt)

Parameters

DateTime $createdAt

Return Value

AbstractDateTimed

DateTime getUpdatedAt()

Return Value

DateTime

AbstractDateTimed setUpdatedAt(DateTime $updatedAt)

Parameters

DateTime $updatedAt

Return Value

AbstractDateTimed

preUpdate()

prePersist()

AbstractEntity resetDates()

Set creation and update date to now.

Return Value

AbstractEntity

float getPosition()

Return Value

float

$this setPosition(float $newPosition)

Set position as a float to enable increment and decrement by O.5 to insert a node between two others.

Parameters

float $newPosition

Return Value

$this

Collection getChildren()

Return Value

Collection

$this addChild(LeafInterface $child)

Parameters

LeafInterface $child

Return Value

$this

$this removeChild(LeafInterface $child)

Parameters

LeafInterface $child

Return Value

$this

LeafInterface getParent()

Return Value

LeafInterface parent

$this setParent(LeafInterface $parent = null)

Parameters

LeafInterface $parent

Return Value

$this

LeafInterface[] getParents()

Return every tag’s parents.

Return Value

LeafInterface[]

int getDepth()

Gets the nodes depth.

Return Value

int

getIterator()

{@inheritdoc}

count()

{@inheritdoc}

static string getStatusLabel(int $status)

Parameters

int $status

Return Value

string

string getNodeName()

Return Value

string

$this setNodeName(string $nodeName)

Parameters

string $nodeName

Return Value

$this

boolean isDynamicNodeName()

Dynamic node name will be updated against default translated nodeSource title at each save.

Disable this parameter if you need to protect your nodeName from title changes.

Return Value

boolean

$this setDynamicNodeName(boolean $dynamicNodeName)

Parameters

boolean $dynamicNodeName

Return Value

$this

boolean isHome()

Return Value

boolean

$this setHome(boolean $home)

Parameters

boolean $home

Return Value

$this

boolean isVisible()

Return Value

boolean

$this setVisible(boolean $visible)

Parameters

boolean $visible

Return Value

$this

int getStatus()

Return Value

int

$this setStatus(int $status)

Parameters

int $status

Return Value

$this

boolean isPublished()

Return Value

boolean

boolean isPending()

Return Value

boolean

boolean isDraft()

Return Value

boolean

boolean isDeleted()

Return Value

boolean

$this setPublished(boolean $published)

Parameters

boolean $published

Return Value

$this

$this setPending(boolean $pending)

Parameters

boolean $pending

Return Value

$this

boolean isLocked()

Return Value

boolean

$this setLocked(boolean $locked)

Parameters

boolean $locked

Return Value

$this

integer getPriority()

Return Value

integer

$this setPriority(integer $priority)

Parameters

integer $priority

Return Value

$this

mixed getHideChildren()

Return Value

mixed

Node setHideChildren(mixed $hideChildren)

Parameters

mixed $hideChildren

Return Value

Node

boolean isHidingChildren()

Return Value

boolean

$this setHidingChildren(boolean $hideChildren)

Parameters

boolean $hideChildren

Return Value

$this

boolean isArchived()

Return Value

boolean

$this setArchived(boolean $archived)

Parameters

boolean $archived

Return Value

$this

boolean isSterile()

Return Value

boolean

$this setSterile(boolean $sterile)

Parameters

boolean $sterile

Return Value

$this

string getChildrenOrder()

Return Value

string

$this setChildrenOrder(string $childrenOrder)

Parameters

string $childrenOrder

Return Value

$this

string getChildrenOrderDirection()

Return Value

string

$this setChildrenOrderDirection(string $childrenOrderDirection)

Parameters

string $childrenOrderDirection

Return Value

$this

NodeType getNodeType()

Return Value

NodeType

$this setNodeType(NodeType $nodeType = null)

Parameters

NodeType $nodeType

Return Value

$this

ArrayCollection getTags()

Return Value

ArrayCollection

$this removeTag(Tag $tag)

Parameters

Tag $tag

Return Value

$this

$this addTag(Tag $tag)

Parameters

Tag $tag

Return Value

$this

ArrayCollection getCustomForms()

Return Value

ArrayCollection

ArrayCollection getStackTypes()

Return Value

ArrayCollection

$this removeStackType(NodeType $stackType)

Parameters

NodeType $stackType

Return Value

$this

$this addStackType(NodeType $stackType)

Parameters

NodeType $stackType

Return Value

$this

ArrayCollection getNodeSources()

Return Value

ArrayCollection

Collection getNodeSourcesByTranslation(Translation $translation)

Get node-sources using a given translation.

Parameters

Translation $translation

Return Value

Collection

$this removeNodeSources(NodesSources $ns)

Parameters

NodesSources $ns

Return Value

$this

$this addNodeSources(NodesSources $ns)

Parameters

NodesSources $ns

Return Value

$this

ArrayCollection getBNodes()

Return nodes related to this (B nodes).

Return Value

ArrayCollection

ArrayCollection getANodes()

Return nodes which own a relation with this (A nodes).

Return Value

ArrayCollection

__construct(NodeType $nodeType = null)

Create a new empty Node according to given node-type.

Parameters

NodeType $nodeType

string getOneLineSummary()

Return Value

string

string getOneLineSourceSummary()

Return Value

string

__clone()

After clone method.

Clone current node and ist relations.

string __toString()

Return Value

string