You are here

public function ConfigActionsService::processAction in Config Actions 8

Process a single config_actions action

Parameters

array $action: array of action data

array $options: optional array of action options If $options is empty, values are taken from $action data

string $action_id: The id string of the action to be executed. If omitted, execute all actions in the $action array. Nested actions can be separated with a colon, such as "action:subaction"

Return value

mixed Returns the data processed, or NULL if no action was processed.

Overrides ConfigActionsServiceInterface::processAction

1 call to ConfigActionsService::processAction()
ConfigActionsService::importAction in src/ConfigActionsService.php
Process a specific action id from a given module

File

src/ConfigActionsService.php, line 335

Class

ConfigActionsService
Base class for config_actions plugins.

Namespace

Drupal\config_actions

Code

public function processAction(array $action, array $options = [], $action_id = '') {
  $data = $this
    ->doProcessAction($action, [], $options, $action_id, '');
  $this
    ->saveAll();
  return $data;
}