/** * Gets direct children for the node * * @param sfAssetFolder $node Propel object for parent node * @param PropelPDO $con Connection to use. */ public static function retrieveChildren(NodeObject $node, PropelPDO $con = null) { $c = new Criteria(sfAssetFolderPeer::DATABASE_NAME); $c->addAscendingOrderByColumn(self::LEFT_COL); if (self::SCOPE_COL) { $c->add(self::SCOPE_COL, $node->getScopeIdValue(), Criteria::EQUAL); } $c->add(self::LEFT_COL, $node->getLeftValue(), Criteria::GREATER_THAN); $c->addAnd(self::RIGHT_COL, $node->getRightValue(), Criteria::LESS_THAN); $stmt = sfAssetFolderPeer::doSelectStmt($c, $con); return sfAssetFolderPeer::hydrateChildren($node, $stmt); }