Commit 7c0295d2 authored by alexpott's avatar alexpott
Browse files

Issue #2355977 by larowlan, dashaforbes: Fixed Code references...

Issue #2355977 by larowlan, dashaforbes: Fixed Code references RelationLinkManagerInterface::getRelationInternalIds but no such method.
parent c997eeef
......@@ -62,4 +62,5 @@ public function getRelationUri($entity_type, $bundle, $field_name) {
public function getRelationInternalIds($relation_uri) {
return $this->relationLinkManager->getRelationInternalIds($relation_uri);
}
}
......@@ -12,7 +12,7 @@
use Drupal\Core\Entity\ContentEntityTypeInterface;
use Drupal\Core\Entity\EntityManagerInterface;
class RelationLinkManager implements RelationLinkManagerInterface{
class RelationLinkManager implements RelationLinkManagerInterface {
/**
* @var \Drupal\Core\Cache\CacheBackendInterface;
......@@ -40,7 +40,7 @@ public function __construct(CacheBackendInterface $cache, EntityManagerInterface
}
/**
* Implements \Drupal\rest\LinkManager\RelationLinkManagerInterface::getRelationUri().
* {@inheritdoc}
*/
public function getRelationUri($entity_type, $bundle, $field_name) {
// @todo Make the base path configurable.
......@@ -48,7 +48,7 @@ public function getRelationUri($entity_type, $bundle, $field_name) {
}
/**
* Implements \Drupal\rest\LinkManager\RelationLinkManagerInterface::getRelationInternalIds().
* {@inheritdoc}
*/
public function getRelationInternalIds($relation_uri) {
$relations = $this->getRelations();
......@@ -71,7 +71,7 @@ public function getRelationInternalIds($relation_uri) {
* An array of typed data ids (entity_type, bundle, and field name) keyed
* by corresponding relation URI.
*/
public function getRelations() {
protected function getRelations() {
$cid = 'rest:links:relations';
$cache = $this->cache->get($cid);
if (!$cache) {
......
......@@ -23,4 +23,16 @@ interface RelationLinkManagerInterface {
* The corresponding URI for the field.
*/
public function getRelationUri($entity_type, $bundle, $field_name);
/**
* Translates a REST URI into internal IDs.
*
* @param string $relation_uri
* Relation URI to transform into internal IDs
*
* @return array
* Array with keys 'entity_type', 'bundle' and 'field_name'.
*/
public function getRelationInternalIds($relation_uri);
}
......@@ -63,7 +63,7 @@ public function getTypeInternalIds($type_uri) {
* An array of typed data ids (entity_type and bundle) keyed by
* corresponding type URI.
*/
public function getTypes() {
protected function getTypes() {
$cid = 'rest:links:types';
$cache = $this->cache->get($cid);
if (!$cache) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment