interface SubstitutionInterface in Linkit 8.5
Interface for substitution plugins.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\linkit\SubstitutionInterface
Expanded class hierarchy of SubstitutionInterface
All classes that implement SubstitutionInterface
3 files declare their use of SubstitutionInterface
- Canonical.php in src/
Plugin/ Linkit/ Substitution/ Canonical.php - File.php in src/
Plugin/ Linkit/ Substitution/ File.php - Media.php in src/
Plugin/ Linkit/ Substitution/ Media.php
File
- src/
SubstitutionInterface.php, line 12
Namespace
Drupal\linkitView source
interface SubstitutionInterface extends PluginInspectionInterface {
/**
* Get the URL associated with a given entity.
*
* @param \Drupal\Core\Entity\EntityInterface $entity
* The entity to get a URL for.
*
* @return \Drupal\Core\GeneratedUrl
* A url to replace.
*/
public function getUrl(EntityInterface $entity);
/**
* Checks if this substitution plugin is applicable for the given entity type.
*
* @param \Drupal\Core\Entity\EntityTypeInterface $entity_type
* An entity type object.
*
* @return bool
* If the plugin is applicable.
*/
public static function isApplicable(EntityTypeInterface $entity_type);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
SubstitutionInterface:: |
public | function | Get the URL associated with a given entity. | 3 |
SubstitutionInterface:: |
public static | function | Checks if this substitution plugin is applicable for the given entity type. | 3 |