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