/** * Gets number of direct children for given node * * @param sfBreadNav $node Propel object for src node * @param PropelPDO $con Connection to use. * @return int Level for the given node */ public static function getNumberOfChildren(NodeObject $node, PropelPDO $con = null) { $children = sfBreadNavPeer::retrieveChildren($node); return count($children); }
/** * Gets the children for the node * * @param PropelPDO Connection to use. * @return array */ public function getChildren(PropelPDO $con = null) { $this->getLevel(); if (is_array($this->_children)) { return $this->_children; } return sfBreadNavPeer::retrieveChildren($this, $con); }