@@ 291-300 (lines=10) @@ | ||
288 | /** |
|
289 | * @inheritdoc |
|
290 | */ |
|
291 | public function withRelationshipSelfLink($resource, string $relationshipName): EncoderInterface |
|
292 | { |
|
293 | $link = $this |
|
294 | ->getSchemaContainer()->getSchema($resource) |
|
295 | ->getRelationshipSelfLink($resource, $relationshipName); |
|
296 | ||
297 | return $this->withLinks( |
|
298 | [ |
|
299 | LinkInterface::SELF => $link, |
|
300 | ] |
|
301 | ); |
|
302 | } |
|
303 | ||
@@ 307-316 (lines=10) @@ | ||
304 | /** |
|
305 | * @inheritdoc |
|
306 | */ |
|
307 | public function withRelationshipRelatedLink($resource, string $relationshipName): EncoderInterface |
|
308 | { |
|
309 | $link = $this |
|
310 | ->getSchemaContainer()->getSchema($resource) |
|
311 | ->getRelationshipRelatedLink($resource, $relationshipName); |
|
312 | ||
313 | return $this->withLinks( |
|
314 | [ |
|
315 | LinkInterface::RELATED => $link, |
|
316 | ] |
|
317 | ); |
|
318 | } |
|
319 |