/** * 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 sfAssetFolderPeer::retrieveChildren($this, $con); }
/** * Gets number of direct children for given node * * @param sfAssetFolder $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 = sfAssetFolderPeer::retrieveChildren($node); return count($children); }