function EditorController::__construct

Same name and namespace in other branches
  1. main core/modules/editor/src/EditorController.php \Drupal\editor\EditorController::__construct()

File

core/modules/editor/src/EditorController.php, line 16

Class

EditorController
Returns responses for Editor module routes.

Namespace

Drupal\editor

Code

public function __construct(protected ?Element $editorElement = NULL) {
  if (!$editorElement) {
    @trigger_error('Calling ' . __METHOD__ . '() without the $editorElement argument is deprecated in drupal:11.4.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3568146', E_USER_DEPRECATED);
    $this->editorElement = \Drupal::service(Element::class);
  }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.