/** * Tests if $node has an ancestor * * @param sfAssetFolder $node Propel object for node * @param PropelPDO $con Connection to use. * @return bool */ public static function hasParent(NodeObject $node, PropelPDO $con = null) { return sfAssetFolderPeer::isValid(sfAssetFolderPeer::retrieveParent($node, $con)); }
/** * Gets ancestor for the given node if it exists * * @param PropelPDO $con Connection to use. * @return mixed Propel object if exists else false */ public function retrieveParent(PropelPDO $con = null) { if (null === $this->hasParentNode) { $this->parentNode = sfAssetFolderPeer::retrieveParent($this, $con); $this->hasParentNode = sfAssetFolderPeer::isValid($this->parentNode); } return $this->parentNode; }
public function retrieveParentIgnoringPooling(PropelPDO $con = null) { return sfAssetFolderPeer::retrieveParent($this, $con); }