You are here

public function ShareMessageBlock::__construct in Share Message 8

Constructs an ShareMessageBlock object.

Parameters

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

string $plugin_id: The plugin_id for the plugin instance.

array $plugin_definition: The plugin implementation definition.

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

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/ShareMessageBlock.php, line 50

Class

ShareMessageBlock
Provides a 'ShareMessage' block with the AddThis widgets.

Namespace

Drupal\sharemessage\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->storageController = $entity_type_manager
    ->getStorage('sharemessage');
  $this->viewBuilder = $entity_type_manager
    ->getViewBuilder('sharemessage');
}