"Fossies" - the Fresh Open Source Software Archive

Member "drupal-8.9.10/core/lib/Drupal/Core/Action/Plugin/Action/Derivative/EntityPublishedActionDeriver.php" (26 Nov 2020, 608 Bytes) of package /linux/www/drupal-8.9.10.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) PHP source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "EntityPublishedActionDeriver.php" see the Fossies "Dox" file reference documentation.

    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 }