You are here

public function SocialSendEmail::setContext in Open Social 10.2.x

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::setContext()
  2. 8.8 modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::setContext()
  3. 10.3.x modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::setContext()
  4. 10.0.x modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::setContext()
  5. 10.1.x modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php \Drupal\social_user\Plugin\Action\SocialSendEmail::setContext()

Set action context.

Implementation should have an option to add data to the context, not overwrite it on every method execution.

Parameters

array $context: The context array.

Overrides ViewsBulkOperationsActionBase::setContext

See also

ViewsBulkOperationsActionBase::setContext

File

modules/social_features/social_user/src/Plugin/Action/SocialSendEmail.php, line 138

Class

SocialSendEmail
An example action covering most of the possible options.

Namespace

Drupal\social_user\Plugin\Action

Code

public function setContext(array &$context) {
  parent::setContext($context);

  // @todo make the batch size configurable.
  $context['batch_size'] = Settings::get('social_mail_batch_size', 25);
}