original_string: public function parents($depth = null) {
          $condition = [
              'and',
              [$this->leftAttribute => ['$lt' => $this->owner->getAttribute($this->leftAttribute)]],
              [$this->rightAttribute => ['$gt' => $this->owner->getAttribute($this->rightAttribute)]],
          ];
  
          if ($depth !== null) {
              $condition[] = [$this->depthAttribute => ['$gte' => $this->owner->getAttribute($this->depthAttribute) - $depth]];
          }
  
          $this->applyTreeAttributeCondition($condition);
  
          return $this->owner->find()->andWhere($condition)->addOrderBy([$this->leftAttribute => SORT_ASC]);
      }
code: public function parents($depth = null) {
          $condition = [
              'and',
              [$this->leftAttribute => ['$lt' => $this->owner->getAttribute($this->leftAttribute)]],
              [$this->rightAttribute => ['$gt' => $this->owner->getAttribute($this->rightAttribute)]],
          ];
  
          if ($depth !== null) {
              $condition[] = [$this->depthAttribute => ['$gte' => $this->owner->getAttribute($this->depthAttribute) - $depth]];
          }
  
          $this->applyTreeAttributeCondition($condition);
  
          return $this->owner->find()->andWhere($condition)->addOrderBy([$this->leftAttribute => SORT_ASC]);
      }
code_tokens: public function parents ( $ depth = null ) { $ condition = [ 'and' , [ $ this -> leftAttribute => [ '$lt' => $ this -> owner -> getAttribute ( $ this -> leftAttribute ) ] ] , [ $ this -> rightAttribute => [ '$gt' => $ this -> owner -> getAttribute ( $ this -> rightAttribute ) ] ] , ] ; if ( $ depth !== null ) { $ condition [ ] = [ $ this -> depthAttribute => [ '$gte' => $ this -> owner -> getAttribute ( $ this -> depthAttribute ) - $ depth ] ] ; } $ this -> applyTreeAttributeCondition ( $ condition ) ; return $ this -> owner -> find ( ) -> andWhere ( $ condition ) -> addOrderBy ( [ $ this -> leftAttribute => SORT_ASC ] ) ; }
docstring: Gets the parents of the node.
  @param integer|null $depth the depth
  @return \yii\db\ActiveQuery
docstring_tokens: Gets the parents of the node .