public static function Canonical::isApplicable in Linkit 8.5
Checks if this substitution plugin is applicable for the given entity type.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: An entity type object.
Return value
bool If the plugin is applicable.
Overrides SubstitutionInterface::isApplicable
1 call to Canonical::isApplicable()
- SubstitutionPluginTest::testCanonicalSubstitution in tests/
src/ Kernel/ SubstitutionPluginTest.php - Test the canonical substitution.
File
- src/
Plugin/ Linkit/ Substitution/ Canonical.php, line 30
Class
- Canonical
- A substitution plugin for the canonical URL of an entity.
Namespace
Drupal\linkit\Plugin\Linkit\SubstitutionCode
public static function isApplicable(EntityTypeInterface $entity_type) {
return $entity_type
->hasLinkTemplate('canonical');
}