src/wcmf/lib/model/Node.php
public function getFirstChild($role=null, $type=null, $values=null, $properties=null, $useRegExp=true) {
    $children = $this->getChildrenEx(null, $role, $type, $values, $properties, $useRegExp);
    if (sizeof($children) > 0) {
      return $children[0];
    }
    else {
      return null;
    }
  }
public function getFirstChild($role=null, $type=null, $values=null, $properties=null, $useRegExp=true) {
    $children = $this->getChildrenEx(null, $role, $type, $values, $properties, $useRegExp);
    if (sizeof($children) > 0) {
      return $children[0];
    }
    else {
      return null;
    }
  }
public function getFirstChild ( $ role = null , $ type = null , $ values = null , $ properties = null , $ useRegExp = true ) { $ children = $ this -> getChildrenEx ( null , $ role , $ type , $ values , $ properties , $ useRegExp ) ; if ( sizeof ( $ children ) > 0 ) { return $ children [ 0 ] ; } else { return null ; } }
Get the first child that matches given conditions.
@param $role The role that the child should match (optional, default: _null_).
@param $type The type that the child should match (either fully qualified or simple, if not ambiguous)
(optional, default: _null_).
@param $values An associative array holding key value pairs that the child values should match (optional, default: _null_).
@param $properties An associative array holding key value pairs that the child 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 child that matches given conditions .