interface ForwardLinkGeneratorInterface in Forward 4.x
Same name and namespace in other branches
- 4.0.x src/Services/ForwardLinkGeneratorInterface.php \Drupal\forward\Services\ForwardLinkGeneratorInterface
Defines an interface for generating a Forward link on an entity.
Hierarchy
- interface \Drupal\forward\Services\ForwardLinkGeneratorInterface
Expanded class hierarchy of ForwardLinkGeneratorInterface
All classes that implement ForwardLinkGeneratorInterface
1 file declares its use of ForwardLinkGeneratorInterface
- ForwardLinkFormatter.php in src/
Plugin/ Field/ FieldFormatter/ ForwardLinkFormatter.php
File
- src/
Services/ ForwardLinkGeneratorInterface.php, line 10
Namespace
Drupal\forward\ServicesView source
interface ForwardLinkGeneratorInterface {
/**
* Generate a Forward link for a given entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* Entity for which the link is being generated.
* @param array $settings
* Array with these keys:
* title - the link title, with tokens allowed
* style - 0, 1, or 2 (text only, icon only, text and icon)
* icon - optional path to custom icon, or a blank string
* nofollow - true if a nofollow tag should be included
*
* @return array
* A render array containing the generated link.
*
* @see the ForwardLinkFormatter for example usage.
*/
public function generate(EntityInterface $entity, array $settings);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ForwardLinkGeneratorInterface:: |
public | function | Generate a Forward link for a given entity. | 1 |