[ Index ] |
|
Code source de LifeType 1.2.4 |
1 <?php 2 3 lt_include( PLOG_CLASS_PATH."class/xml/tree/Node.php" ); 4 5 /** 6 * \ingroup Template 7 * 8 * Wraps around an XML_Tree_Node object to represent a node from the 9 * menu tree 10 */ 11 class MenuEntry extends XML_Tree_Node 12 { 13 14 /** 15 * constructor 16 * 17 * @param entryId The name of the node/menu entry 18 * @param entryAttrs an array containing the attributes of the menu entry (locale id, 19 * use bread&crumbs, etc) 20 */ 21 function MenuEntry( $entryId, $entryAttrs = Array()) 22 { 23 $this->XML_Tree_Node( $entryId, '', $entryAttrs ); 24 } 25 26 /** 27 * adds a subentry. Reimplemented from XML_Tree_Node, it seems to behave a bit weird... 28 * 29 * @param entry 30 * @return Returns true if successful or false otherwise 31 */ 32 function addEntry( &$entry, $entryOrder = -1 ) 33 { 34 // calculate the right position 35 if ($entryOrder < 0) { 36 $entryOrder = count($this->children); 37 } 38 39 // and then simply add the node 40 $this->children[$entryOrder] = &$entry; 41 } 42 } 43 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |