function Text::__construct

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

Constructs a Handler 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.

Overrides HandlerBase::__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.