You are here

public function ChartsBlock::__construct in Charts 8.4

Same name and namespace in other branches
  1. 8.3 modules/charts_blocks/src/Plugin/Block/ChartsBlock.php \Drupal\charts_blocks\Plugin\Block\ChartsBlock::__construct()
  2. 5.0.x modules/charts_blocks/src/Plugin/Block/ChartsBlock.php \Drupal\charts_blocks\Plugin\Block\ChartsBlock::__construct()

Overrides BlockPluginTrait::__construct

File

modules/charts_blocks/src/Plugin/Block/ChartsBlock.php, line 33

Class

ChartsBlock
Provides a 'ChartsBlock' block.

Namespace

Drupal\charts_blocks\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ChartsSettingsService $chartsSettings) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this
    ->setConfiguration($configuration);
  $this->chartsDefaultSettings = $chartsSettings
    ->getChartsSettings();
}