function Text::__construct

Same name and namespace in other branches
  1. 11.x core/modules/views/src/Plugin/views/area/Text.php \Drupal\views\Plugin\views\area\Text::__construct()

File

core/modules/views/src/Plugin/views/area/Text.php, line 22

Class

Text
Views area text handler.

Namespace

Drupal\views\Plugin\views\area

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, ?FilterFormatRepositoryInterface $format_repository = NULL) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  if (!$format_repository) {
    @trigger_error('Calling ' . __METHOD__ . '() without the $format_repository argument is deprecated in drupal:11.4.0 and the $format_repository argument will be required in drupal:12.0.0. See https://www.drupal.org/node/3035368', E_USER_DEPRECATED);
    $format_repository = \Drupal::service(FilterFormatRepositoryInterface::class);
  }
  $this->formatRepository = $format_repository;
}

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