public function UEditor::__construct in UEditor - 百度编辑器 8
Constructs a \Drupal\ueditor\Plugin\Editor\UEditor 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\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.
\Drupal\Core\State\StateInterface $state: The state key/value store.
Overrides PluginBase::__construct
File
- src/
Plugin/ Editor/ UEditor.php, line 78
Class
- UEditor
- Defines a UEditor-based text editor for Drupal.
Namespace
Drupal\ueditor\Plugin\EditorCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager, RendererInterface $renderer, StateInterface $state) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->moduleHandler = $module_handler;
$this->languageManager = $language_manager;
$this->renderer = $renderer;
$this->state = $state;
$this->global_settings = \Drupal::config('ueditor.settings')
->get('ueditor_global_settings');
}