$resource['name'], 'mkdate' => date('c', $resource['mkdate']), 'chdate' => date('c', $resource['chdate']), ]; } public function getRelationships($resource, ContextInterface $context): iterable { $relationships = []; // SemClass $related = $resource->getClass(); $relationships[self::REL_SEM_CLASS] = [ self::RELATIONSHIP_LINKS => [ Link::RELATED => $this->createLinkToResource($related) ], self::RELATIONSHIP_DATA => $related, ]; return $relationships; } }