You are here

public function SimplenewsSubscriptionBlock::__construct in Simplenews 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Block/SimplenewsSubscriptionBlock.php \Drupal\simplenews\Plugin\Block\SimplenewsSubscriptionBlock::__construct()
  2. 3.x src/Plugin/Block/SimplenewsSubscriptionBlock.php \Drupal\simplenews\Plugin\Block\SimplenewsSubscriptionBlock::__construct()

Constructs an SimplenewsSubscriptionBlock 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\Form\FormBuilderInterface $formBuilder: The form builder object.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/SimplenewsSubscriptionBlock.php, line 54

Class

SimplenewsSubscriptionBlock
Provides an 'Simplenews subscription' block with all available newsletters and an email field.

Namespace

Drupal\simplenews\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, FormBuilderInterface $formBuilder) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->entityTypeManager = $entity_type_manager;
  $this->formBuilder = $formBuilder;
}