You are here

public function ViewsBulkOperationsSimpleTestAction::execute in Views Bulk Operations (VBO) 4.0.x

Same name and namespace in other branches
  1. 8.3 tests/views_bulk_operations_test/src/Plugin/Action/ViewsBulkOperationsSimpleTestAction.php \Drupal\views_bulk_operations_test\Plugin\Action\ViewsBulkOperationsSimpleTestAction::execute()
  2. 8 tests/views_bulk_operations_test/src/Plugin/Action/ViewsBulkOperationsSimpleTestAction.php \Drupal\views_bulk_operations_test\Plugin\Action\ViewsBulkOperationsSimpleTestAction::execute()
  3. 8.2 tests/views_bulk_operations_test/src/Plugin/Action/ViewsBulkOperationsSimpleTestAction.php \Drupal\views_bulk_operations_test\Plugin\Action\ViewsBulkOperationsSimpleTestAction::execute()

Executes the plugin.

Overrides ExecutableInterface::execute

File

tests/views_bulk_operations_test/src/Plugin/Action/ViewsBulkOperationsSimpleTestAction.php, line 24

Class

ViewsBulkOperationsSimpleTestAction
Action for test purposes only.

Namespace

Drupal\views_bulk_operations_test\Plugin\Action

Code

public function execute($entity = NULL) {
  $this
    ->messenger()
    ->addMessage(sprintf('Test action (preconfig: %s, label: %s)', $this->configuration['preconfig'], $entity
    ->label()));
  return 'Test';
}