You are here

protected function EntityFlagDeriver::isApplicable in farmOS 2.x

Indicates whether the deriver can be used for the provided entity type.

Parameters

\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.

Return value

bool TRUE if the entity type can be used, FALSE otherwise.

Overrides EntityActionDeriverBase::isApplicable

File

modules/core/flag/src/Plugin/Action/Derivative/EntityFlagDeriver.php, line 37

Class

EntityFlagDeriver
Provides an action deriver that finds entity types with a flag form.

Namespace

Drupal\farm_flag\Plugin\Action\Derivative

Code

protected function isApplicable(EntityTypeInterface $entity_type) {
  return $entity_type
    ->hasLinkTemplate('flag-action-form');
}