original_string: public function parentRelationActiveByDefault(string $relation): ModelList
      {
          $this->main['default_top_relation'] = $relation;
  
          if ( ! array_get($this->main, 'parents')) {
              // Assume the relation (= the field) if no parents set yet.
  
              $this->main['parents'] = [
                  [
                      'relation' => $relation,
                      'field'    => $relation,
                  ],
              ];
          }
  
          return $this;
      }
code: public function parentRelationActiveByDefault(string $relation): ModelList
      {
          $this->main['default_top_relation'] = $relation;
  
          if ( ! array_get($this->main, 'parents')) {
              // Assume the relation (= the field) if no parents set yet.
  
              $this->main['parents'] = [
                  [
                      'relation' => $relation,
                      'field'    => $relation,
                  ],
              ];
          }
  
          return $this;
      }
code_tokens: public function parentRelationActiveByDefault ( string $ relation ) : ModelList { $ this -> main [ 'default_top_relation' ] = $ relation ; if ( ! array_get ( $ this -> main , 'parents' ) ) { // Assume the relation (= the field) if no parents set yet. $ this -> main [ 'parents' ] = [ [ 'relation' => $ relation , 'field' => $ relation , ] , ] ; } return $ this ; }
docstring: Hide everything but top-level list parents by default to this relation
  
  Useful to remove clutter for nested content with a click-through-to-children setup.
  Set to relation method name that must be present in 'parents'.
  
  @param string $relation
  @return ModelList|$this
docstring_tokens: Hide everything but top - level list parents by default to this relation