interface EntityLinkTargetInterface
Provides an interface for generating a link target from an entity.
Hierarchy
- interface \Drupal\Core\Entity\EntityLinkTargetInterface
Expanded class hierarchy of EntityLinkTargetInterface
All classes that implement EntityLinkTargetInterface
4 files declare their use of EntityLinkTargetInterface
- FileLinkTarget.php in core/
modules/ file/ src/ Entity/ FileLinkTarget.php - MediaLinkTarget.php in core/
modules/ media/ src/ Entity/ MediaLinkTarget.php - MenuLinkContentLinkTarget.php in core/
modules/ menu_link_content/ src/ Entity/ MenuLinkContentLinkTarget.php - ShortcutLinkTarget.php in core/
modules/ shortcut/ src/ Entity/ ShortcutLinkTarget.php
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityLinkTargetInterface.php, line 12
Namespace
Drupal\Core\EntityView source
interface EntityLinkTargetInterface {
/**
* Gets the generated URL object for a linked entity's link target.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* A linked entity.
*
* @return \Drupal\Core\GeneratedUrl
* The generated URL plus cacheability metadata.
*/
public function getLinkTarget(EntityInterface $entity) : GeneratedUrl;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.