UnchangingCacheableDependencyTrait::getCacheTags

public UnchangingCacheableDependencyTrait::getCacheTags() The cache tags associated with this object. When this object is modified, these cache tags will be invalidated. Return value string[] A set of cache tags. Overrides CacheableDependencyInterface::getCacheTags File core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php, line 22 Class UnchangingCacheableDependencyTrait Trait to implement CacheableDependencyInterface for unchanging objects. Namespace Drupal\Core\Cache Co

UnchangingCacheableDependencyTrait::getCacheMaxAge

public UnchangingCacheableDependencyTrait::getCacheMaxAge() The maximum age for which this object may be cached. Return value int The maximum time in seconds that this object may be cached. Overrides CacheableDependencyInterface::getCacheMaxAge File core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php, line 29 Class UnchangingCacheableDependencyTrait Trait to implement CacheableDependencyInterface for unchanging objects. Namespace Drupal\Core\Cache Code public function ge

UnchangingCacheableDependencyTrait::getCacheContexts

public UnchangingCacheableDependencyTrait::getCacheContexts() The cache contexts associated with this object. These identify a specific variation/representation of the object. Cache contexts are tokens: placeholders that are converted to cache keys by the @cache_contexts_manager service. The replacement value depends on the request context (the current URL, language, and so on). They're converted before storing an object in cache. Return value string[] An array of cache context tokens, used to

UnchangingCacheableDependencyTrait

Trait to implement CacheableDependencyInterface for unchanging objects. Hierarchy trait \Drupal\Core\Cache\UnchangingCacheableDependencyTrait See also \Drupal\Core\Cache\CacheableDependencyInterface File core/lib/Drupal/Core/Cache/UnchangingCacheableDependencyTrait.php, line 10 Namespace Drupal\Core\Cache Members Name Modifiers Type Description UnchangingCacheableDependencyTrait::getCacheContexts public function The cache contexts associated with this object. Overrides

TypeLinkManagerInterface::getTypeUri

public TypeLinkManagerInterface::getTypeUri($entity_type, $bundle, $context = array()) Gets the URI that corresponds to a bundle. When using hypermedia formats, this URI can be used to indicate which bundle the data represents. Documentation about required and optional fields can also be provided at this URI. Parameters $entity_type: The bundle's entity type. $bundle: The bundle name. array $context: (optional) Optional serializer/normalizer context. Return value string The corresponding URI

TypeLinkManagerInterface::getTypeInternalIds

public TypeLinkManagerInterface::getTypeInternalIds($type_uri, $context = array()) 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. File core/modules/rest/src/LinkManager/TypeLinkManagerInterface.php, line 38 Class TypeLinkManagerInterface Namespa

TypeLinkManagerInterface

Hierarchy interface \Drupal\rest\LinkManager\ConfigurableLinkManagerInterfaceinterface \Drupal\rest\LinkManager\TypeLinkManagerInterface File core/modules/rest/src/LinkManager/TypeLinkManagerInterface.php, line 5 Namespace Drupal\rest\LinkManager Members Name Modifiers Type Description ConfigurableLinkManagerInterface::setLinkDomain public function Sets the link domain used in constructing link URIs. TypeLinkManagerInterface::getTypeInternalIds public function G

TypeLinkManager::__construct

public TypeLinkManager::__construct(CacheBackendInterface $cache, ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory, RequestStack $request_stack, EntityTypeBundleInfoInterface $bundle_info_service) Constructor. Parameters \Drupal\Core\Cache\CacheBackendInterface $cache: The injected cache backend for caching type URIs. \Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service. \Drupal\Core\Config\ConfigFactoryInterface $config_factor

TypeLinkManager::writeCache

protected TypeLinkManager::writeCache($context = array()) Writes the cache 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 121 Class TypeLinkManager Namespace Drupal\rest\LinkManager Code protected function writeCache($context = array()) { $data = array(); // Type URIs

TypeLinkManager::getTypeUri

public TypeLinkManager::getTypeUri($entity_type, $bundle, $context = array()) Gets the URI that corresponds to a bundle. When using hypermedia formats, this URI can be used to indicate which bundle the data represents. Documentation about required and optional fields can also be provided at this URI. Parameters $entity_type: The bundle's entity type. $bundle: The bundle name. array $context: (optional) Optional serializer/normalizer context. Return value string The corresponding URI for the b