You are here

protected function TypeLinkManager::getTypes in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/hal/src/LinkManager/TypeLinkManager.php \Drupal\hal\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/hal/src/LinkManager/TypeLinkManager.php
Get a bundle's Typed Data IDs based on a URI.

File

core/modules/hal/src/LinkManager/TypeLinkManager.php, line 110

Class

TypeLinkManager

Namespace

Drupal\hal\LinkManager

Code

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