You are here

public function LinkProviderBase::getLinkKey in JSON:API Hypermedia 8

Gets the link object key for the provided link.

Return value

string A key for the provided link.

Overrides LinkProviderInterface::getLinkKey

1 call to LinkProviderBase::getLinkKey()
TestLinkProvider::getLink in tests/modules/jsonapi_hypermedia_test_link_providers/src/Plugin/jsonapi_hypermedia/LinkProvider/TestLinkProvider.php
Adds, alters or removes hyperlinks from a link collection.

File

src/Plugin/LinkProviderBase.php, line 16

Class

LinkProviderBase
Class LinkProviderBase.

Namespace

Drupal\jsonapi_hypermedia\Plugin

Code

public function getLinkKey() {
  $plugin_definition = $this
    ->getPluginDefinition();
  return $plugin_definition['link_key'] ?? $this
    ->getLinkRelationType();
}