You are here

protected function EntityDelete::doExecute in Rules 8.3

Deletes the Entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The entity to be deleted.

File

src/Plugin/RulesAction/EntityDelete.php, line 34

Class

EntityDelete
Provides a 'Delete entity' action.

Namespace

Drupal\rules\Plugin\RulesAction

Code

protected function doExecute(EntityInterface $entity) {
  $entity
    ->delete();
}