function CKEditor::__construct
Same name in other branches
- 8.9.x core/modules/ckeditor/src/Plugin/Editor/CKEditor.php \Drupal\ckeditor\Plugin\Editor\CKEditor::__construct()
Constructs a \Drupal\ckeditor\Plugin\Editor\CKEditor 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\ckeditor\CKEditorPluginManager $ckeditor_plugin_manager: The CKEditor 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.
\Drupal\Core\State\StateInterface $state: The state key/value store.
\Drupal\Core\File\FileUrlGeneratorInterface $file_url_generator: The file URL generator.
\Drupal\Core\Extension\ModuleExtensionList $module_list: The module list service.
File
-
core/
modules/ ckeditor/ src/ Plugin/ Editor/ CKEditor.php, line 108
Class
- CKEditor
- Defines a CKEditor-based text editor for Drupal.
Namespace
Drupal\ckeditor\Plugin\EditorCode
public function __construct(array $configuration, $plugin_id, $plugin_definition, CKEditorPluginManager $ckeditor_plugin_manager, ModuleHandlerInterface $module_handler, LanguageManagerInterface $language_manager, RendererInterface $renderer, StateInterface $state, FileUrlGeneratorInterface $file_url_generator = NULL, ModuleExtensionList $module_list = NULL) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->ckeditorPluginManager = $ckeditor_plugin_manager;
$this->moduleHandler = $module_handler;
$this->languageManager = $language_manager;
$this->renderer = $renderer;
$this->state = $state;
if (!$file_url_generator) {
@trigger_error('Calling CKEditor::__construct() without the $file_url_generator argument is deprecated in drupal:9.3.0 and will be required before drupal:10.0.0. See https://www.drupal.org/node/2940031', E_USER_DEPRECATED);
$file_url_generator = \Drupal::service('file_url_generator');
}
$this->fileUrlGenerator = $file_url_generator;
if (!$module_list) {
@trigger_error('Calling CKEditor::__construct() without the $module_list argument is deprecated in drupal:9.3.0 and is required in drupal:10.0.0. See https://www.drupal.org/node/2940438', E_USER_DEPRECATED);
$module_list = \Drupal::service('extension.list.module');
}
$this->moduleList = $module_list;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.