public function getParentsId($includeSelf = false)
    {
        $cacheKey = [
            'class' => self::className(),
            'ownerClass' => $this->ownerClassName,
            'method' => 'getParentsId',
            'id' => $this->owner->{$this->primaryKey},
        ];
        if ( $this->owner->{$this->parentIdField} ) {
            $parents = $this->cache->getOrSet($cacheKey, function(){
                return self::getParentsIdRec($this->owner->{$this->parentIdField}, $this->ownerClassName, $this->primaryKey, $this->parentIdField);
            }, null, $this->getTagDependency());
        } else {
            $parents = [];
        }
        return $includeSelf ? array_merge($parents, [$this->owner->{$this->primaryKey}]) : $parents;
    }
public function getParentsId($includeSelf = false)
    {
        $cacheKey = [
            'class' => self::className(),
            'ownerClass' => $this->ownerClassName,
            'method' => 'getParentsId',
            'id' => $this->owner->{$this->primaryKey},
        ];
        if ( $this->owner->{$this->parentIdField} ) {
            $parents = $this->cache->getOrSet($cacheKey, function(){
                return self::getParentsIdRec($this->owner->{$this->parentIdField}, $this->ownerClassName, $this->primaryKey, $this->parentIdField);
            }, null, $this->getTagDependency());
        } else {
            $parents = [];
        }
        return $includeSelf ? array_merge($parents, [$this->owner->{$this->primaryKey}]) : $parents;
    }
public function getParentsId ( $ includeSelf = false ) { $ cacheKey = [ 'class' => self :: className ( ) , 'ownerClass' => $ this -> ownerClassName , 'method' => 'getParentsId' , 'id' => $ this -> owner -> { $ this -> primaryKey } , ] ; if ( $ this -> owner -> { $ this -> parentIdField } ) { $ parents = $ this -> cache -> getOrSet ( $ cacheKey , function ( ) { return self :: getParentsIdRec ( $ this -> owner -> { $ this -> parentIdField } , $ this -> ownerClassName , $ this -> primaryKey , $ this -> parentIdField ) ; } , null , $ this -> getTagDependency ( ) ) ; } else { $ parents = [ ] ; } return $ includeSelf ? array_merge ( $ parents , [ $ this -> owner -> { $ this -> primaryKey } ] ) : $ parents ; }
Return parents id, ordered by level
@param boolean $includeSelf
@return integer[]
Return parents id ordered by level