function FilterFormatListBuilder::__construct

Same name and namespace in other branches
  1. 10 core/modules/filter/src/FilterFormatListBuilder.php \Drupal\filter\FilterFormatListBuilder::__construct()
  2. 9 core/modules/filter/src/FilterFormatListBuilder.php \Drupal\filter\FilterFormatListBuilder::__construct()
  3. 8.9.x core/modules/filter/src/FilterFormatListBuilder.php \Drupal\filter\FilterFormatListBuilder::__construct()
  4. main core/modules/filter/src/FilterFormatListBuilder.php \Drupal\filter\FilterFormatListBuilder::__construct()

Overrides DraggableListBuilder::__construct

File

core/modules/filter/src/FilterFormatListBuilder.php, line 46

Class

FilterFormatListBuilder
Defines a class to build a listing of filter format entities.

Namespace

Drupal\filter

Code

public function __construct(EntityTypeInterface $entity_type, EntityStorageInterface $storage, ConfigFactoryInterface $config_factory, MessengerInterface $messenger, ?FilterFormatRepositoryInterface $format_repository = NULL) {
  parent::__construct($entity_type, $storage);
  $this->configFactory = $config_factory;
  $this->messenger = $messenger;
  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.