Documenation

Node

/_plugins/node.php

Nodes are used to built linked data structures (trees). They can be used to store a references to pages or files hierarchically.

Class

$model->node

Public functions

  • $model->node->route ( array $params )
    Finds the node id for a route and let the appropriate plugin to handle the route further.
  • $model->node->permalink ( string $title [ , int $id ] )
    Creates a machine-readable version of the title of a node.
  • $model->node->create ( string $title, string $type, int $parentId )
    Creates a new node.
  • $model->node->move ( int $id, int $parentId )
    Moves a node to another branch.
  • $model->node->delete ( int $id )
    Deletes a node.
  • $model->node->get ( int $id )
    Gets information about a node.
  • $model->node->get_parents ( int $id )
    Gets a list of all parent nodes, starting from the root.
  • $model->node->get_children ( int $id )
    Gets a list of all child nodes.
  • $model->node->tree ( array $nodes )
    Creates a structured array of nodes.

Constants

  • node::rootId
    Reserved user ID for the root node.