Mercurial > hg > isophonics-drupal-site
comparison core/modules/hal/src/LinkManager/RelationLinkManagerInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\hal\LinkManager; | |
4 | |
5 interface RelationLinkManagerInterface extends ConfigurableLinkManagerInterface { | |
6 | |
7 /** | |
8 * Gets the URI that corresponds to a field. | |
9 * | |
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. | |
13 * | |
14 * @param string $entity_type | |
15 * The bundle's entity type. | |
16 * @param string $bundle | |
17 * The bundle name. | |
18 * @param string $field_name | |
19 * The field name. | |
20 * @param array $context | |
21 * (optional) Optional serializer/normalizer context. | |
22 * | |
23 * @return string | |
24 * The corresponding URI (or IANA link relation type) for the field. | |
25 */ | |
26 public function getRelationUri($entity_type, $bundle, $field_name, $context = []); | |
27 | |
28 /** | |
29 * Translates a REST URI into internal IDs. | |
30 * | |
31 * @param string $relation_uri | |
32 * Relation URI (or IANA link relation type) to transform into internal IDs. | |
33 * | |
34 * @return array | |
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. | |
38 */ | |
39 public function getRelationInternalIds($relation_uri); | |
40 | |
41 } |