class Node extends AbstractDateTimedPositioned implements IteratorAggregate, Countable (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

Constants

DRAFT

PENDING

PUBLISHED

ARCHIVED

DELETED

Properties

protected $id from AbstractEntity
protected DateTime $createdAt from AbstractDateTimed
protected DateTime $updatedAt from AbstractDateTimed
protected $position from PositionedTrait
protected $handler
protected $dynamicNodeName
protected $hideChildren
protected ArrayCollection $bNodes
protected ArrayCollection $aNodes
protected $newsletter

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

Set node position before persisting.

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.

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

getParent()

No description

$this
setParent(Node $parent = null)

No description

ArrayCollection
getChildren()

No description

$this
addChild(Node $child)

No description

$this
removeChild(Node $child)

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

getNewsletter()

No description

__construct(NodeType $nodeType = null)

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

string
getOneLineSummary()

No description

string
getOneLineSourceSummary()

No description

getHandler()

No description

__clone()

After clone method.

string
__toString()

No description

int
getDepth()

Gets the nodes depth.

getIterator()

[email protected]}

count()

[email protected]}

Details

int getId()

Return Value

int

AbstractEntity setId(int $id)

Parameters

int $id

Return Value

AbstractEntity

DateTime getCreatedAt()

Return Value

DateTime

AbstractEntity setCreatedAt(DateTime $createdAt)

Parameters

DateTime $createdAt

Return Value

AbstractEntity

DateTime getUpdatedAt()

Return Value

DateTime

AbstractEntity setUpdatedAt(DateTime $updatedAt)

Parameters

DateTime $updatedAt

Return Value

AbstractEntity

preUpdate()

prePersist()

Set node position before persisting.

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

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

Node getParent()

Return Value

Node Parent node

$this setParent(Node $parent = null)

Parameters

Node $parent

Return Value

$this

ArrayCollection getChildren()

Return Value

ArrayCollection

$this addChild(Node $child)

Parameters

Node $child

Return Value

$this

$this removeChild(Node $child)

Parameters

Node $child

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

Newsletter getNewsletter()

Return Value

Newsletter

__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

NodeHandler getHandler()

Return Value

NodeHandler

__clone()

After clone method.

Clone current node and ist relations.

string __toString()

Return Value

string

int getDepth()

Gets the nodes depth.

Return Value

int

getIterator()

[email protected]}

count()

[email protected]}