You are here

public function MassContactForm::__construct in Mass Contact 8

Constructs the Mass Contact form.

Parameters

\Drupal\Core\Entity\EntityManagerInterface $entity_manager: The entity manager.

\Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info: The entity type bundle service.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler service.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager service.

\Drupal\mass_contact\MassContactInterface $mass_contact: The mass contact service.

\Drupal\user\PrivateTempStoreFactory $temp_store_factory: The factory for the temp store object.

Overrides ContentEntityForm::__construct

File

src/Form/MassContactForm.php, line 69

Class

MassContactForm
Main form for sending Mass Contact emails.

Namespace

Drupal\mass_contact\Form

Code

public function __construct(EntityManagerInterface $entity_manager, EntityTypeBundleInfoInterface $entity_type_bundle_info = NULL, TimeInterface $time = NULL, ModuleHandlerInterface $module_handler, EntityTypeManagerInterface $entity_type_manager, MassContactInterface $mass_contact, PrivateTempStoreFactory $temp_store_factory) {
  parent::__construct($entity_manager, $entity_type_bundle_info, $time);
  $this->config = $this
    ->configFactory()
    ->get('mass_contact.settings');
  $this->entityTypeManager = $entity_type_manager;
  $this->moduleHandler = $module_handler;
  $this->massContact = $mass_contact;
  $this->tempStoreFactory = $temp_store_factory;
}