You are here

protected function EntityPublishedActionDeriver::isApplicable in Drupal 10

Same name and namespace in other branches
  1. 8 core/lib/Drupal/Core/Action/Plugin/Action/Derivative/EntityPublishedActionDeriver.php \Drupal\Core\Action\Plugin\Action\Derivative\EntityPublishedActionDeriver::isApplicable()
  2. 9 core/lib/Drupal/Core/Action/Plugin/Action/Derivative/EntityPublishedActionDeriver.php \Drupal\Core\Action\Plugin\Action\Derivative\EntityPublishedActionDeriver::isApplicable()

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

core/lib/Drupal/Core/Action/Plugin/Action/Derivative/EntityPublishedActionDeriver.php, line 19

Class

EntityPublishedActionDeriver
Provides an action deriver that finds publishable entity types.

Namespace

Drupal\Core\Action\Plugin\Action\Derivative

Code

protected function isApplicable(EntityTypeInterface $entity_type) {
  return $entity_type
    ->entityClassImplements(EntityPublishedInterface::class);
}