EntityChangedActionDeriver.php 555 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?php

namespace Drupal\Core\Action\Plugin\Action\Derivative;

use Drupal\Core\Entity\EntityChangedInterface;
use Drupal\Core\Entity\EntityTypeInterface;

/**
 * Provides an action deriver that finds entity types of EntityChangedInterface.
 *
 * @see \Drupal\Core\Action\Plugin\Action\SaveAction
 */
class EntityChangedActionDeriver extends EntityActionDeriverBase {

  /**
   * {@inheritdoc}
   */
  protected function isApplicable(EntityTypeInterface $entity_type) {
    return $entity_type->entityClassImplements(EntityChangedInterface::class);
  }

}