You are here

public function SubscriptionBlock::__construct in Mailing List 8

Constructs a SubscriptionBlock object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

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

\Drupal\Core\Entity\FormBuilderInterface $form_builder: The form builder object.

\Drupal\mailing_list\MailingListManagerInterface $mailing_list_manager: The mailing list manager.

\Drupal\Core\Session\AccountInterface $current_user: The current user.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/SubscriptionBlock.php, line 73

Class

SubscriptionBlock
Mailing list subscription blocks.

Namespace

Drupal\mailing_list\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, FormBuilderInterface $form_builder, MailingListManagerInterface $mailing_list_manager, AccountInterface $current_user) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->entityTypeManager = $entity_type_manager;
  $this->formBuilder = $form_builder;
  $this->mailingListManager = $mailing_list_manager;
  $this->currentUser = $current_user;
}