You are here

public function CarouselBlock::__construct in bootstrap simple carousel 8

Constructs a \Drupal\system\ConfigFormBase 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\Config\ConfigFactoryInterface $config_factory: The config factory.

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

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/CarouselBlock.php, line 67

Class

CarouselBlock
Provides a 'Bootstrap simple carousel' Block.

Namespace

Drupal\bootstrap_simple_carousel\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory, EntityTypeManagerInterface $entity_type_manager) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->moduleSettings = $config_factory
    ->get('bootstrap_simple_carousel.settings');
  $this->carouselItemStorage = $entity_type_manager
    ->getStorage('bootstrap_simple_carousel');
  $this->entityTypeManager = $entity_type_manager;
  $this->imageStyleService = $entity_type_manager
    ->getStorage('image_style');
}