Public Member Functions | |
__construct ($container) | |
getNodes () | |
getIterator () | |
offsetSet ($key, $value) | |
offsetGet ($key) | |
offsetUnset ($key) | |
offsetExists ($key) | |
add (Varien_Data_Tree_Node $node) | |
delete ($node) | |
count () | |
lastNode () | |
searchById ($nodeId) |
Definition at line 34 of file Collection.php.
__construct | ( | $ | container | ) |
Definition at line 39 of file Collection.php.
00040 { 00041 $this->_nodes = array(); 00042 $this->_container = $container; 00043 }
add | ( | Varien_Data_Tree_Node $ | node | ) |
Adds a node to this node
Definition at line 93 of file Collection.php.
00094 { 00095 $node->setParent($this->_container); 00096 00097 // Set the Tree for the node 00098 if ($this->_container->getTree() instanceof Varien_Data_Tree) { 00099 $node->setTree($this->_container->getTree()); 00100 } 00101 00102 $this->_nodes[$node->getId()] = $node; 00103 00104 return $node; 00105 }
count | ( | ) |
delete | ( | $ | node | ) |
Definition at line 107 of file Collection.php.
00108 { 00109 if (isset($this->_nodes[$node->getId()])) { 00110 unset($this->_nodes[$node->getId()]); 00111 } 00112 return $this; 00113 }
getIterator | ( | ) |
getNodes | ( | ) |
lastNode | ( | ) |
Definition at line 120 of file Collection.php.
00121 { 00122 return !empty($this->_nodes) ? $this->_nodes[count($this->_nodes) - 1] : null; 00123 }
offsetExists | ( | $ | key | ) |
offsetGet | ( | $ | key | ) |
offsetSet | ( | $ | key, | |
$ | value | |||
) |
offsetUnset | ( | $ | key | ) |
searchById | ( | $ | nodeId | ) |
Definition at line 125 of file Collection.php.
00126 { 00127 if (isset($this->_nodes[$nodeId])) { 00128 return $this->_nodes[$nodeId]; 00129 } 00130 return null; 00131 }