You are here

public function MatomoReportsBlock::__construct in Matomo Reports 8

Constructs a new MatomoReportsBlock object.

Parameters

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

string $plugin_id: The plugin_id for the block.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Session\AccountProxyInterface $currentUser: The current user.

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

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: The config factory.

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

\Drupal\Core\Render\RendererInterface $renderer: The renderer service.

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/MatomoReportsBlock.php, line 82

Class

MatomoReportsBlock
Provides a 'MatomoReportsBlock' block.

Namespace

Drupal\matomo_reports\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, AccountProxyInterface $currentUser, EntityTypeManagerInterface $entityTypeManager, ConfigFactoryInterface $configFactory, ModuleHandlerInterface $moduleHandler, RendererInterface $renderer) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->currentUser = $currentUser;
  $this->entityTypeManager = $entityTypeManager;
  $this->configFactory = $configFactory;
  $this->moduleHandler = $moduleHandler;
  $this->renderer = $renderer;
}