You are here

public function EntityDeleteAction::execute in Views Bulk Operations (VBO) 8.2

Same name and namespace in other branches
  1. 8.3 src/Plugin/Action/EntityDeleteAction.php \Drupal\views_bulk_operations\Plugin\Action\EntityDeleteAction::execute()
  2. 8 src/Plugin/Action/EntityDeleteAction.php \Drupal\views_bulk_operations\Plugin\Action\EntityDeleteAction::execute()
  3. 4.0.x src/Plugin/Action/EntityDeleteAction.php \Drupal\views_bulk_operations\Plugin\Action\EntityDeleteAction::execute()

Executes the plugin.

Overrides ExecutableInterface::execute

File

src/Plugin/Action/EntityDeleteAction.php, line 23

Class

EntityDeleteAction
Delete entity action with default confirmation form.

Namespace

Drupal\views_bulk_operations\Plugin\Action

Code

public function execute($entity = NULL) {
  $entity
    ->delete();
  return $this
    ->t('Delete entities');
}