05548eeba81d07cfb76130d2d95505639f2bfac1
[yaffs-website] / web / core / lib / Drupal / Core / Action / Plugin / Action / Derivative / EntityPublishedActionDeriver.php
1 <?php
2
3 namespace Drupal\Core\Action\Plugin\Action\Derivative;
4
5 use Drupal\Core\Entity\EntityPublishedInterface;
6 use 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  */
14 class 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 }