1<?php
2
3namespace Drupal\Core\Action\Plugin\Action\Derivative;
4
5use Drupal\Core\Entity\EntityPublishedInterface;
6use Drupal\Core\Entity\EntityTypeInterface;
7
8/**
9 * Provides an action deriver that finds publishable entity types.
10 *
11 * @see \Drupal\Core\Action\Plugin\Action\PublishAction
12 * @see \Drupal\Core\Action\Plugin\Action\UnpublishAction
13 */
14class EntityPublishedActionDeriver extends EntityActionDeriverBase {
15
16  /**
17   * {@inheritdoc}
18   */
19  protected function isApplicable(EntityTypeInterface $entity_type) {
20    return $entity_type->entityClassImplements(EntityPublishedInterface::class);
21  }
22
23}
24