protected function RelationLinkManager::getRelations in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/rest/src/LinkManager/RelationLinkManager.php \Drupal\rest\LinkManager\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.
Parameters
array $context: Context from the normalizer/serializer operation.
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 core/
modules/ rest/ src/ LinkManager/ RelationLinkManager.php - Translates a REST URI into internal IDs.
File
- core/
modules/ rest/ src/ LinkManager/ RelationLinkManager.php, line 109 - Contains \Drupal\rest\LinkManager\RelationLinkManager.
Class
Namespace
Drupal\rest\LinkManagerCode
protected function getRelations($context = array()) {
$cid = 'rest:links:relations';
$cache = $this->cache
->get($cid);
if (!$cache) {
$this
->writeCache($context);
$cache = $this->cache
->get($cid);
}
return $cache->data;
}