public function isRelationshipInFieldSet(StackReadOnlyInterface $stack) { $resourceType = $stack->penult()->getResource()->getType(); $resourceFieldSet = $this->getFieldSet($resourceType); $inFieldSet = $resourceFieldSet === null ? true : array_key_exists($stack->end()->getRelationship()->getName(), $resourceFieldSet); return $inFieldSet; }