public function BlockStyleBase::__construct in Block Style Plugins 8
Same name and namespace in other branches
- 8.2 src/Plugin/BlockStyleBase.php \Drupal\block_style_plugins\Plugin\BlockStyleBase::__construct()
Construct method for BlockStyleBase.
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\EntityRepositoryInterface $entityRepository: An Entity Repository instance.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: An Entity Type Manager instance.
Overrides PluginBase::__construct
File
- src/
Plugin/ BlockStyleBase.php, line 78
Class
- BlockStyleBase
- Base class for Block style plugins.
Namespace
Drupal\block_style_plugins\PluginCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityRepositoryInterface $entityRepository, EntityTypeManagerInterface $entityTypeManager) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
// Store our dependencies.
$this->entityRepository = $entityRepository;
$this->entityTypeManager = $entityTypeManager;
// Store the plugin ID.
$this->pluginId = $plugin_id;
}