function BlockDeleteForm::__construct

Same name and namespace in other branches
  1. 11.x core/modules/block/src/Form/BlockDeleteForm.php \Drupal\block\Form\BlockDeleteForm::__construct()

File

core/modules/block/src/Form/BlockDeleteForm.php, line 24

Class

BlockDeleteForm
Provides a deletion confirmation form for the block instance deletion form.

Namespace

Drupal\block\Form

Code

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

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