TreeBehavior::_treeLimits PHP Méthode

_treeLimits() protected méthode

gets the list of left and right boundaries for any given owner objects.
protected _treeLimits ( CDbConnection $db, string $tree_table, string $obj_id )
$db CDbConnection
$tree_table string
$obj_id string
    protected function _treeLimits($db, $tree_table, $obj_id)
    {
        $query = 'SELECT ' . $this->leftAttribute . ',' . $this->rightAttribute . ' FROM ' . $tree_table . ' WHERE ' . $this->idAttribute . ' = ' . $db->quoteValue($obj_id);
        $res = $db->createCommand($query)->query();
        $result = array();
        foreach ($res as $r) {
            $result[] = array($r[$this->leftAttribute], $r[$this->rightAttribute]);
        }
        return $result;
    }