You are here

public function TypeLinkManager::getTypeInternalIds 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::getTypeInternalIds()

Get a bundle's Typed Data IDs based on a URI.

Parameters

string $type_uri: The type URI.

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

Return value

array | boolean If the URI matches a bundle, returns an array containing entity_type and bundle. Otherwise, returns false.

Overrides TypeLinkManagerInterface::getTypeInternalIds

File

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

Class

TypeLinkManager

Namespace

Drupal\rest\LinkManager

Code

public function getTypeInternalIds($type_uri, $context = array()) {
  $types = $this
    ->getTypes($context);
  if (isset($types[$type_uri])) {
    return $types[$type_uri];
  }
  return FALSE;
}