You are here

public static function MediaDownload::isApplicable in Media Entity Download 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Linkit/Substitution/MediaDownload.php \Drupal\media_entity_download\Plugin\Linkit\Substitution\MediaDownload::isApplicable()

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/MediaDownload.php, line 95

Class

MediaDownload
A substitution plugin for a direct download link to a file.

Namespace

Drupal\media_entity_download\Plugin\Linkit\Substitution

Code

public static function isApplicable(EntityTypeInterface $entity_type) {
  return $entity_type
    ->entityClassImplements('Drupal\\media_entity\\MediaInterface');
}