interface TypeLinkManagerInterface implements TypeLinkManagerInterface (View source)

deprecated in drupal:8.3.0 and is removed from drupal:9.0.0. This has been moved to the hal module. This exists solely for BC.

Methods

$this
setLinkDomain(string $domain)

Sets the link domain used in constructing link URIs.

string
getTypeUri($entity_type, $bundle, array $context = [])

Gets the URI that corresponds to a bundle.

array|bool
getTypeInternalIds(string $type_uri, array $context = [])

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

Details

$this setLinkDomain(string $domain)

Sets the link domain used in constructing link URIs.

Parameters

string $domain

The link domain to use for constructing link URIs.

Return Value

$this

string getTypeUri($entity_type, $bundle, array $context = [])

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 bundle.

array|bool getTypeInternalIds(string $type_uri, array $context = [])

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|bool

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