You are here

public static function File::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 File::isApplicable()
SubstitutionPluginTest::testFileSubstitutions in tests/src/Kernel/SubstitutionPluginTest.php
Test the file substitution.

File

src/Plugin/Linkit/Substitution/File.php, line 35

Class

File
A substitution plugin for the URL to a file.

Namespace

Drupal\linkit\Plugin\Linkit\Substitution

Code

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