Back to OnGetApiRelation class

Method setRelationship

public void
setRelationship
(\Tobscure\JsonApi\Relationship $relationship)
Set relationship object that should be rendered.
Parameters
  • \Tobscure\JsonApi\Relationship $relationship The relationship object that should be rendered.
Returns
  • void
Since
  • 4.0.0

Method setRelationship - Source code

/**
 * Set relationship object that should be rendered.
 *
 * @param   Relationship  $relationship  The relationship object that should be rendered.
 *
 * @return  void
 * @since   4.0.0
 */
public function setRelationship(Relationship $relationship) : void
{
    $this->relationship = $relationship;
}