public static function MediaFileRedirect::isApplicable in Media Entity File Redirect 8
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
File
- src/
Plugin/ Linkit/ Substitution/ MediaFileRedirect.php, line 31
Class
- MediaFileRedirect
- A substitution plugin for the URL to a file associated with a media entity.
Namespace
Drupal\media_entity_file_redirect\Plugin\Linkit\SubstitutionCode
public static function isApplicable(EntityTypeInterface $entity_type) {
return $entity_type
->entityClassImplements('Drupal\\media\\MediaInterface');
}