src/wcmf/lib/model/Node.php
public function getNodeRelation($object) {
    $relations = $this->getRelations();
    foreach ($relations as $curRelation) {
      $curRelatives = parent::getValue($curRelation->getOtherRole());
      if ($curRelatives instanceof Node && $curRelatives->getOID() == $object->getOID()) {
        return $curRelation;
      }
      elseif (is_array($curRelatives)) {
        foreach ($curRelatives as $curRelative) {
          if ($curRelative->getOID() == $object->getOID()) {
            return $curRelation;
          }
        }
      }
    }
    return null;
  }
public function getNodeRelation($object) {
    $relations = $this->getRelations();
    foreach ($relations as $curRelation) {
      $curRelatives = parent::getValue($curRelation->getOtherRole());
      if ($curRelatives instanceof Node && $curRelatives->getOID() == $object->getOID()) {
        return $curRelation;
      }
      elseif (is_array($curRelatives)) {
        foreach ($curRelatives as $curRelative) {
          if ($curRelative->getOID() == $object->getOID()) {
            return $curRelation;
          }
        }
      }
    }
    return null;
  }
public function getNodeRelation ( $ object ) { $ relations = $ this -> getRelations ( ) ; foreach ( $ relations as $ curRelation ) { $ curRelatives = parent :: getValue ( $ curRelation -> getOtherRole ( ) ) ; if ( $ curRelatives instanceof Node && $ curRelatives -> getOID ( ) == $ object -> getOID ( ) ) { return $ curRelation ; } elseif ( is_array ( $ curRelatives ) ) { foreach ( $ curRelatives as $ curRelative ) { if ( $ curRelative -> getOID ( ) == $ object -> getOID ( ) ) { return $ curRelation ; } } } } return null ; }
Get the relation description for a given node.
@param $object PersistentObject instance to look for
@return RelationDescription instance or null, if the Node is not related
Get the relation description for a given node .