Chris@0
|
1 <?php
|
Chris@0
|
2
|
Chris@0
|
3 namespace Drupal\hal\LinkManager;
|
Chris@0
|
4
|
Chris@0
|
5 interface RelationLinkManagerInterface extends ConfigurableLinkManagerInterface {
|
Chris@0
|
6
|
Chris@0
|
7 /**
|
Chris@0
|
8 * Gets the URI that corresponds to a field.
|
Chris@0
|
9 *
|
Chris@0
|
10 * When using hypermedia formats, this URI can be used to indicate which
|
Chris@0
|
11 * field the data represents. Documentation about this field can also be
|
Chris@0
|
12 * provided at this URI.
|
Chris@0
|
13 *
|
Chris@0
|
14 * @param string $entity_type
|
Chris@0
|
15 * The bundle's entity type.
|
Chris@0
|
16 * @param string $bundle
|
Chris@0
|
17 * The bundle name.
|
Chris@0
|
18 * @param string $field_name
|
Chris@0
|
19 * The field name.
|
Chris@0
|
20 * @param array $context
|
Chris@0
|
21 * (optional) Optional serializer/normalizer context.
|
Chris@0
|
22 *
|
Chris@0
|
23 * @return string
|
Chris@0
|
24 * The corresponding URI (or IANA link relation type) for the field.
|
Chris@0
|
25 */
|
Chris@0
|
26 public function getRelationUri($entity_type, $bundle, $field_name, $context = []);
|
Chris@0
|
27
|
Chris@0
|
28 /**
|
Chris@0
|
29 * Translates a REST URI into internal IDs.
|
Chris@0
|
30 *
|
Chris@0
|
31 * @param string $relation_uri
|
Chris@0
|
32 * Relation URI (or IANA link relation type) to transform into internal IDs.
|
Chris@0
|
33 *
|
Chris@0
|
34 * @return array
|
Chris@0
|
35 * Array with keys 'entity_type_id', 'bundle' and 'field_name'. For
|
Chris@0
|
36 * backwards compatibility, the entity_type key returns the full entity type
|
Chris@0
|
37 * object, this will be removed before Drupal 9.0.
|
Chris@0
|
38 */
|
Chris@0
|
39 public function getRelationInternalIds($relation_uri);
|
Chris@0
|
40
|
Chris@0
|
41 }
|