original_string: 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
          );
      }
code: 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
          );
      }
code_tokens: 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 ) ; }
docstring: 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
docstring_tokens: Looks up the current full list parent hierarchy chain to the top level .