You are here

public function MassContact::processMassContactMessage in Mass Contact 8

Main entry point for queuing mass contact emails.

Parameters

\Drupal\mass_contact\Entity\MassContactMessageInterface $message: The mass contact message entity.

array $configuration: An array of configuration. Default values are provided by the mass contact settings.

Overrides MassContactInterface::processMassContactMessage

File

src/MassContact.php, line 137

Class

MassContact
The Mass Contact helper service.

Namespace

Drupal\mass_contact

Code

public function processMassContactMessage(MassContactMessageInterface $message, array $configuration = []) {
  $configuration += $this
    ->getDefaultConfiguration();
  $data = [
    'message' => $message,
    'configuration' => $configuration,
  ];
  $this->processingQueue
    ->createItem($data);
  if ($configuration['create_archive_copy']) {
    $message
      ->save();
  }
}