Beta version

class NodeTypeHandler

Handle operations with node-type entities.

Methods

getNodeType()

No description

$this
setNodeType(NodeType $nodeType)

No description

__construct(NodeType $nodeType)

Create a new node-type handler with node-type to handle.

string
getGeneratedEntitiesFolder()

No description

boolean
removeSourceEntityClass()

Remove node type entity class file from server.

string
generateSourceEntityClass()

Generate Doctrine entity class for current nodetype.

$this
updateSchema()

Clear doctrine metadata cache and regenerate entity class file.

regenerateEntityClass()

Delete and recreate entity class file.

$this
deleteSchema()

Delete node-type class from database.

$this
deleteWithAssociations()

Delete node-type inherited nodes and its database schema before removing it from node-types table.

diff(NodeType $newNodeType)

Update current node-type using a new one.

int
cleanFieldsPositions()

Reset current node-type fields positions.

Details

at line 50
NodeType getNodeType()

Return Value

NodeType

at line 60
$this setNodeType(NodeType $nodeType)

Parameters

NodeType $nodeType

Return Value

$this

at line 72
__construct(NodeType $nodeType)

Create a new node-type handler with node-type to handle.

Parameters

NodeType $nodeType

at line 80
string getGeneratedEntitiesFolder()

Return Value

string

at line 90
boolean removeSourceEntityClass()

Remove node type entity class file from server.

Return Value

boolean

at line 107
string generateSourceEntityClass()

Generate Doctrine entity class for current nodetype.

Return Value

string or false

at line 178
$this updateSchema()

Clear doctrine metadata cache and regenerate entity class file.

Return Value

$this

at line 189
regenerateEntityClass()

Delete and recreate entity class file.

at line 202
$this deleteSchema()

Delete node-type class from database.

Return Value

$this

at line 227
$this deleteWithAssociations()

Delete node-type inherited nodes and its database schema before removing it from node-types table.

Return Value

$this

at line 274
diff(NodeType $newNodeType)

Update current node-type using a new one.

Update diff will update only non-critical fields such as :

  • description
  • displayName

It will only create absent node-type fields won't delete fields not to lose any data.

This method does not flush ORM. You'll need to manually call it.

Parameters

NodeType $newNodeType

Exceptions

RuntimeException If newNodeType param is null

at line 347
int cleanFieldsPositions()

Reset current node-type fields positions.

Return Value

int Return the next position after the last field