You are here

interface ViewsBulkOperationsActionInterface in Views Bulk Operations (VBO) 8

Same name and namespace in other branches
  1. 8.3 src/Action/ViewsBulkOperationsActionInterface.php \Drupal\views_bulk_operations\Action\ViewsBulkOperationsActionInterface
  2. 8.2 src/Action/ViewsBulkOperationsActionInterface.php \Drupal\views_bulk_operations\Action\ViewsBulkOperationsActionInterface
  3. 4.0.x src/Action/ViewsBulkOperationsActionInterface.php \Drupal\views_bulk_operations\Action\ViewsBulkOperationsActionInterface

Defines Views Bulk Operations action interface.

Hierarchy

Expanded class hierarchy of ViewsBulkOperationsActionInterface

All classes that implement ViewsBulkOperationsActionInterface

File

src/Action/ViewsBulkOperationsActionInterface.php, line 10

Namespace

Drupal\views_bulk_operations\Action
View source
interface ViewsBulkOperationsActionInterface {

  /**
   * Set action context.
   *
   * Implementation should have an option to add data to the
   * context, not overwrite it on every method execution.
   *
   * @param array $context
   *   The context array.
   *
   * @see ViewsBulkOperationsActionBase::setContext
   */
  public function setContext(array &$context);

  /**
   * Set view object.
   *
   * @param \Drupal\views\ViewExecutable $view
   *   The processed view.
   */
  public function setView(ViewExecutable $view);

  /**
   * Execute action on multiple entities.
   *
   * Can return an array of results of processing, if no return value
   * is provided, action label will be used for each result.
   *
   * @param array $objects
   *   An array of entities.
   *
   * @return array
   *   An array of translatable markup objects or strings (optional)
   */
  public function executeMultiple(array $objects);

}

Members

Namesort descending Modifiers Type Description Overrides
ViewsBulkOperationsActionInterface::executeMultiple public function Execute action on multiple entities. 1
ViewsBulkOperationsActionInterface::setContext public function Set action context. 1
ViewsBulkOperationsActionInterface::setView public function Set view object. 1