protected function collectListParentHierarchy($relation = null, $key = null)
    {
        $this->listParents = [];

        if (null === $relation) {
            $relation = $this->listParentRelation;
            $key      = $this->listParentRecordKey;
        }

        if ( ! $relation || null === $key) {
            return;
        }

        $model = $this->getNewModelInstance();

        $info = $this->getModelInformationForModel($model);

        $this->listParents = $this->getListParentInformation(
            $model,
            $this->listParentRelation,
            $this->listParentRecordKey,
            $info,
            true
        );
    }
protected function collectListParentHierarchy($relation = null, $key = null)
    {
        $this->listParents = [];

        if (null === $relation) {
            $relation = $this->listParentRelation;
            $key      = $this->listParentRecordKey;
        }

        if ( ! $relation || null === $key) {
            return;
        }

        $model = $this->getNewModelInstance();

        $info = $this->getModelInformationForModel($model);

        $this->listParents = $this->getListParentInformation(
            $model,
            $this->listParentRelation,
            $this->listParentRecordKey,
            $info,
            true
        );
    }
protected function collectListParentHierarchy ( $ relation = null , $ key = null ) { $ this -> listParents = [ ] ; if ( null === $ relation ) { $ relation = $ this -> listParentRelation ; $ key = $ this -> listParentRecordKey ; } if ( ! $ relation || null === $ key ) { return ; } $ model = $ this -> getNewModelInstance ( ) ; $ info = $ this -> getModelInformationForModel ( $ model ) ; $ this -> listParents = $ this -> getListParentInformation ( $ model , $ this -> listParentRelation , $ this -> listParentRecordKey , $ info , true ) ; }
Looks up the current full list parent hierarchy chain to the top level.

@param string|null $relation     if not set, uses currently stored values
@param mixed|null  $key
Looks up the current full list parent hierarchy chain to the top level .