You are here

public function Gutenberg::__construct in Gutenberg 8

Same name and namespace in other branches
  1. 8.2 src/Plugin/Editor/Gutenberg.php \Drupal\gutenberg\Plugin\Editor\Gutenberg::__construct()

Constructs a Gutenberg 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\gutenberg\GutenbergPluginManager $gutenberg_plugin_manager: The Gutenberg plugin manager.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler to invoke hooks on.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

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

Overrides PluginBase::__construct

File

src/Plugin/Editor/Gutenberg.php, line 79

Class

Gutenberg
Defines a Gutenberg-based text editor for Drupal.

Namespace

Drupal\gutenberg\Plugin\Editor

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, GutenbergPluginManager $gutenberg_plugin_manager, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager, RendererInterface $renderer) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->gutenbergPluginManager = $gutenberg_plugin_manager;
  $this->moduleHandler = $module_handler;
  $this->languageManager = $language_manager;
  $this->renderer = $renderer;
}