Represents a page in a page tree
This is the code documentation for the SproutCMS project
Search documentation |
class PagenodeRepresents a page in a page tree
Variables
Functions
public __construct (from Treenode)void $Treenode->__construct ( [ array $data ] ); Creates a node, with the specified data public __get (from Treenode)unknown $Treenode->__get ( string &$field ); Generic field getter for unknown properties - used for TreeNode->children Be aware that data gotten through this getter is BY REFERENCE For by-value data retrival, use the array-access functions. public __set (from Treenode)void $Treenode->__set ( string $field , mixed $value ); Generic field getter for unknown properties - used for TreeNode->children public filterChildren (from Treenode)void $Treenode->filterChildren ( TreenodeMatcher $matcher ); Filter the children of this node, removing any children which don't match the specified TreenodeMatcher. The nodes are not actually removed, matching nodes are just added to a filtered children list Which is returned instead of the original children list. public findAllNodes (from Treenode)static[] $Treenode->findAllNodes ( TreenodeMatcher $matcher ); Finds all nodes which match the specified matcher. public findAncestors (from Treenode)static[] $Treenode->findAncestors ( ); Finds all ancestors of a specific node, including the node, not including the root node of the tree The array is in order from top to bottom, so $ancestors[0] is the top-parent, and $ancestors[len-1] is the node. A B C D E F G H I NODE RESULT ARRAY H B D H D B D B B A (empty) public findNode (from Treenode)static $Treenode->findNode ( TreenodeMatcher $matcher ); Finds a node by looking at this node If that does not match, looking at each of this nodes children in turn. If that does not match, return null public findNodeValue (from Treenode)TreeNode $Treenode->findNodeValue ( mixed $key , mixed $value ); Finds a node by looking at this node If that does not match, looking at each of this nodes children in turn. If that does not match, return null public getAllChildren (from Treenode)unknown $Treenode->getAllChildren ( [ mixed $exclude_id [, mixed $indent_str [, mixed $indent ]]] ); Returns an array of all children nodes, including sub-children The array will be id => name. This function requires the table to have a column named 'name'. The name field will be indented according to the depth. If specified, the exclude_id argument will be used to exclude nodes (and their children) according to id. public getBannerstring|null $Pagenode->getBanner ( ); Returns the filename to use for the banner image. Returns NULL if no banner has been defined for this page and a generic banner should be used instead. public getChildren (from Treenode)static[] $Treenode->getChildren ( ); This function does not have a description public getFriendlyUrlstring $Pagenode->getFriendlyUrl ( ); Returns the friendly url for a node public getFriendlyUrlNoprefixstring $Pagenode->getFriendlyUrlNoprefix ( ); Returns the friendly url for a node - but don't include a directory prefix public getNavigationNamestring $Pagenode->getNavigationName ( ); Returns the name that should be used to represent this node when rendering navigation elements on the front-end public getUrlNamestring $Pagenode->getUrlName ( ); Returns the name of this page only, when constructing a URL public isOrphan (from Treenode)bool $Treenode->isOrphan ( ); Is this node an orphan? Orphans are at the top of the tree, and they don't have any children. public isRoot (from Treenode)unknown $Treenode->isRoot ( ); Returns true if this node is the root node public loadTreevoid Pagenode::loadTree ( mixed $table [, array $where [, mixed $order ]] ); Not valid public offsetExists (from Treenode)unknown $Treenode->offsetExists ( mixed $offset ); ArrayAccess function for checking if a specified key exists public offsetGet (from Treenode)unknown $Treenode->offsetGet ( mixed $offset ); ArrayAccess function for getting a value by its key public offsetSet (from Treenode)void $Treenode->offsetSet ( mixed $offset , mixed $value ); ArrayAccess function for setting a value by its key public offsetUnset (from Treenode)void $Treenode->offsetUnset ( mixed $offset ); ArrayAccess function for unsetting a value public removeFilter (from Treenode)void $Treenode->removeFilter ( ); Removes the currently active filter |
Powered by Pelzini, version 0.9.0 |
Documentation is made available under the
GNU Free Documentation License 1.2. Generated: Monday, 3rd April, 2023 at 02:59 pm |