You are here

protected function TypeLinkManager::getTypes in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/rest/src/LinkManager/TypeLinkManager.php \Drupal\rest\LinkManager\TypeLinkManager::getTypes()

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.

1 call to TypeLinkManager::getTypes()
TypeLinkManager::getTypeInternalIds in core/modules/rest/src/LinkManager/TypeLinkManager.php
Get a bundle's Typed Data IDs based on a URI.

File

core/modules/rest/src/LinkManager/TypeLinkManager.php, line 93
Contains \Drupal\rest\LinkManager\TypeLinkManager.

Class

TypeLinkManager

Namespace

Drupal\rest\LinkManager

Code

protected function getTypes($context = array()) {
  $cid = 'rest:links:types';
  $cache = $this->cache
    ->get($cid);
  if (!$cache) {
    $this
      ->writeCache($context);
    $cache = $this->cache
      ->get($cid);
  }
  return $cache->data;
}