You are here

public function BlockShortcode::__construct in Shortcode 2.0.x

Constructs a new Shortcode plugin.

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\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

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

Overrides ShortcodeBase::__construct

File

shortcode_basic_tags/src/Plugin/Shortcode/BlockShortcode.php, line 51

Class

BlockShortcode
Insert a custom block to the text.

Namespace

Drupal\shortcode_basic_tags\Plugin\Shortcode

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->entityTypeManager = $entity_type_manager;
  $this->renderer = $renderer;
}