TypeLinkManager::getTypes

protected TypeLinkManager::getTypes($context = array())

Get the array of type links.

Parameters

array $context: Context from the normalizer/serializer operation.

Return value

array An array of typed data ids (entity_type and bundle) keyed by corresponding type URI.

File

core/modules/rest/src/LinkManager/TypeLinkManager.php, line 99

Class

TypeLinkManager

Namespace

Drupal\rest\LinkManager

Code

protected function getTypes($context = array()) {
  $cid = 'rest:links:types';
  $cache = $this->cache->get($cid);
  if (!$cache) {
    $data = $this->writeCache($context);
  }
  else {
    $data = $cache->data;
  }
  return $data;
}
doc_Drupal
2016-10-29 09:50:16
Comments
Leave a Comment

Please login to continue.