class Generic (View source)

This class represents an arbitrary node.

It is used as a default document, for example with the ParentDocument annotation. You can not use this to create nodes as it has no type annotation.

Properties

protected $id
protected $node
protected $nodename
protected $parent
protected Collection $children
protected Collection $referrers

Methods

string
getId()

Id (path) of this document.

NodeInterface
getNode()

The node of for document.

string
getNodename()

The node name of the document.

$this
setNodename(string $name)

Set the node name of the document. (only mutable on new document before the persist).

object
getParentDocument()

The parent document of this document.

$this
setParentDocument(object $parent)

Set the parent document of this document.

Collection
getChildren()

The children documents of this document.

$this
setChildren(ArrayCollection $children)

Sets the children.

$this
addChild($child)

Add a child to this document.

Collection
getReferrers()

The documents having a reference to this document.

$this;
setReferrers(ArrayCollection $referrers)

Sets the referrers.

$this;
addReferrer($referrer)

Add a referrer to this document.

string
__toString()

String representation.

Details

string getId()

Id (path) of this document.

Return Value

string the id

NodeInterface getNode()

The node of for document.

Return Value

NodeInterface

string getNodename()

The node name of the document.

Return Value

string

$this setNodename(string $name)

Set the node name of the document. (only mutable on new document before the persist).

Parameters

string $name the name of the document

Return Value

$this

object getParentDocument()

The parent document of this document.

Return Value

object Folder document that is the parent of this node.

$this setParentDocument(object $parent)

Set the parent document of this document.

Parameters

object $parent Document that is the parent of this node..

Return Value

$this

Collection getChildren()

The children documents of this document.

If there is information on the document type, the documents are of the specified type, otherwise they will be Generic documents

Return Value

Collection

$this setChildren(ArrayCollection $children)

Sets the children.

Parameters

ArrayCollection $children ArrayCollection

Return Value

$this

$this addChild($child)

Add a child to this document.

Parameters

$child

Return Value

$this

Collection getReferrers()

The documents having a reference to this document.

If there is information on the document type, the documents are of the specified type, otherwise they will be Generic documents

Return Value

Collection

$this; setReferrers(ArrayCollection $referrers)

Sets the referrers.

Parameters

ArrayCollection $referrers ArrayCollection

Return Value

$this;

$this; addReferrer($referrer)

Add a referrer to this document.

Parameters

$referrer

Return Value

$this;

string __toString()

String representation.

Return Value

string