transformRelationship() public method

public transformRelationship ( string $relationshipName, Transformation $transformation, mixed $domainObject, array $additionalMeta = [] ) : array
$relationshipName string
$transformation Transformation
$domainObject mixed
$additionalMeta array
return array
 /**
  * @inheritDoc
  */
 protected function getRelationshipContent($relationshipName, Transformation $transformation, array $additionalMeta = [])
 {
     if (empty($this->domainObject)) {
         return [];
     }
     $result = [];
     foreach ($this->domainObject as $item) {
         $result[] = $this->transformer->transformRelationship($relationshipName, $transformation, $item, $additionalMeta);
     }
     return $result;
 }
 /**
  * @inheritDoc
  */
 protected function getRelationshipContent($relationshipName, Transformation $transformation, array $additionalMeta = [])
 {
     if ($this->hasItems() === false) {
         return [];
     }
     $result = [];
     foreach ($this->getItems() as $item) {
         $result[] = $this->transformer->transformRelationship($relationshipName, $transformation, $item, $additionalMeta);
     }
     return $result;
 }
 /**
  * @inheritDoc
  */
 protected function getRelationshipContent($relationshipName, Transformation $transformation, array $additionalMeta = [])
 {
     return $this->transformer->transformRelationship($relationshipName, $transformation, $this->domainObject, $additionalMeta);
 }