public function RelationLinkManager::getRelations

Get the array of relation links.

Any field can be handled as a relation simply by changing how it is normalized. Therefore, there is no prior knowledge that can be used here to determine which fields to assign relation URIs. Instead, each field, even primitives, are given a relation URI. It is up to the caller to determine which URIs to use.

Return value

array An array of typed data ids (entity_type, bundle, and field name) keyed by corresponding relation URI.

1 call to RelationLinkManager::getRelations()
RelationLinkManager::getRelationInternalIds in drupal/core/modules/rest/lib/Drupal/rest/LinkManager/RelationLinkManager.php
Implements \Drupal\rest\LinkManager\RelationLinkManagerInterface::getRelationInternalIds().

File

drupal/core/modules/rest/lib/Drupal/rest/LinkManager/RelationLinkManager.php, line 61
Contains \Drupal\rest\LinkManager\RelationLinkManager.

Class

RelationLinkManager

Namespace

Drupal\rest\LinkManager

Code

public function getRelations() {
  $cid = 'rest:links:relations';
  $cache = $this->cache
    ->get($cid);
  if (!$cache) {
    $this
      ->writeCache();
    $cache = $this->cache
      ->get($cid);
  }
  return $cache->data;
}