interface LinkProviderInterface in JSON:API Hypermedia 8
Interface LinkProviderInterface.
Hierarchy
- interface \Drupal\jsonapi_hypermedia\LinkProviderInterface
Expanded class hierarchy of LinkProviderInterface
All classes that implement LinkProviderInterface
See also
\Drupal\jsonapi_hypermedia\Plugin\LinkProviderBase;
2 files declare their use of LinkProviderInterface
- LinkProviderBase.php in src/
Plugin/ LinkProviderBase.php - LinkProviderManager.php in src/
Plugin/ LinkProviderManager.php
File
- src/
LinkProviderInterface.php, line 10
Namespace
Drupal\jsonapi_hypermediaView source
interface LinkProviderInterface {
/**
* Gets the link object key for the provided link.
*
* @return string
* A key for the provided link.
*/
public function getLinkKey();
/**
* Gets the link relation type for the provided link.
*
* @return string
* A link relation type name for the provided link.
*/
public function getLinkRelationType();
/**
* Adds, alters or removes hyperlinks from a link collection.
*
* @param \Drupal\jsonapi\JsonApiResource\JsonApiDocumentTopLevel|\Drupal\jsonapi\JsonApiResource\ResourceObject|\Drupal\jsonapi\JsonApiResource\Relationship $context
* The context object from which links should be generated.
*
* @return \Drupal\jsonapi_hypermedia\AccessRestrictedLink
* A link to be added to the context object. An AccessRestrictedLink
* should be returned if the link target may be inaccessible to some users.
*/
public function getLink($context);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
LinkProviderInterface:: |
public | function | Adds, alters or removes hyperlinks from a link collection. | 4 |
LinkProviderInterface:: |
public | function | Gets the link object key for the provided link. | 1 |
LinkProviderInterface:: |
public | function | Gets the link relation type for the provided link. | 1 |