src/wcmf/lib/model/Node.php
public function loadParents($role=null, $buildDepth=BuildDepth::SINGLE) {
    if ($role != null) {
      $this->loadRelations([$role], $buildDepth);
    }
    else {
      $this->loadRelations(array_keys($this->getPossibleParents()), $buildDepth);
    }
  }
public function loadParents($role=null, $buildDepth=BuildDepth::SINGLE) {
    if ($role != null) {
      $this->loadRelations([$role], $buildDepth);
    }
    else {
      $this->loadRelations(array_keys($this->getPossibleParents()), $buildDepth);
    }
  }
public function loadParents ( $ role = null , $ buildDepth = BuildDepth :: SINGLE ) { if ( $ role != null ) { $ this -> loadRelations ( [ $ role ] , $ buildDepth ) ; } else { $ this -> loadRelations ( array_keys ( $ this -> getPossibleParents ( ) ) , $ buildDepth ) ; } }
Load the parents of a given role and add them. If all parents should be
loaded, set the role parameter to null.
@param $role The role of parents to load (maybe null, to load all parents) (default: _null_)
@param $buildDepth One of the BUILDDEPTH constants or a number describing the number of generations to build
(default: _BuildDepth::SINGLE_)
Load the parents of a given role and add them . If all parents should be loaded set the role parameter to null .