src/wcmf/lib/model/Node.php
public function getFirstParent($role=null, $type=null, $values=null, $properties=null, $useRegExp=true) {

    $parents = $this->getParentsEx(null, $role, $type, $values, $properties, $useRegExp);
    if (sizeof($parents) > 0) {
      return $parents[0];
    }
    else {
      return null;
    }
  }
public function getFirstParent($role=null, $type=null, $values=null, $properties=null, $useRegExp=true) {

    $parents = $this->getParentsEx(null, $role, $type, $values, $properties, $useRegExp);
    if (sizeof($parents) > 0) {
      return $parents[0];
    }
    else {
      return null;
    }
  }
public function getFirstParent ( $ role = null , $ type = null , $ values = null , $ properties = null , $ useRegExp = true ) { $ parents = $ this -> getParentsEx ( null , $ role , $ type , $ values , $ properties , $ useRegExp ) ; if ( sizeof ( $ parents ) > 0 ) { return $ parents [ 0 ] ; } else { return null ; } }
Get the first parent that matches given conditions.
@param $role The role that the parent should match (optional, default: _null_).
@param $type The type that the parent should match (either fully qualified or simple, if not ambiguous)
(optional, default: _null_).
@param $values An associative array holding key value pairs that the parent values should match (optional, default: _null_).
@param $properties An associative array holding key value pairs that the parent properties should match (optional, default: _null_).
@param $useRegExp Boolean whether to interpret the given values/properties as regular expressions or not (default: _true_)
@return Node instance or null.
Get the first parent that matches given conditions .