comparison core/modules/hal/src/LinkManager/RelationLinkManager.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children af1871eacc83
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
11 use Symfony\Component\HttpFoundation\RequestStack; 11 use Symfony\Component\HttpFoundation\RequestStack;
12 12
13 class RelationLinkManager extends LinkManagerBase implements RelationLinkManagerInterface { 13 class RelationLinkManager extends LinkManagerBase implements RelationLinkManagerInterface {
14 14
15 /** 15 /**
16 * @var \Drupal\Core\Cache\CacheBackendInterface; 16 * @var \Drupal\Core\Cache\CacheBackendInterface
17 */ 17 */
18 protected $cache; 18 protected $cache;
19 19
20 /** 20 /**
21 * Entity manager. 21 * Entity manager.
68 // module is installed that adds such content, but requires this URL to be 68 // module is installed that adds such content, but requires this URL to be
69 // different (e.g., include a language prefix), then the module must also 69 // different (e.g., include a language prefix), then the module must also
70 // override the RelationLinkManager class/service to return the desired URL. 70 // override the RelationLinkManager class/service to return the desired URL.
71 $uri = $this->getLinkDomain($context) . "/rest/relation/$entity_type/$bundle/$field_name"; 71 $uri = $this->getLinkDomain($context) . "/rest/relation/$entity_type/$bundle/$field_name";
72 $this->moduleHandler->alter('hal_relation_uri', $uri, $context); 72 $this->moduleHandler->alter('hal_relation_uri', $uri, $context);
73 // @deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. This 73 $this->moduleHandler->alterDeprecated('This hook is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.0. Implement hook_hal_relation_uri_alter() instead.', 'rest_relation_uri', $uri, $context);
74 // hook is invoked to maintain backwards compatibility
75 // @see https://www.drupal.org/node/2830467
76 $this->moduleHandler->alter('rest_relation_uri', $uri, $context);
77 return $uri; 74 return $uri;
78 } 75 }
79 76
80 /** 77 /**
81 * {@inheritdoc} 78 * {@inheritdoc}