diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php index 680a64960c..1e02d397af 100644 --- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php @@ -68,7 +68,7 @@ public function __construct(array $configuration, $plugin_id, $plugin_definition $this->vocabularyStorage = $vocabulary_storage; $this->termStorage = $term_storage; if (!$entity_repository) { - @trigger_error('Calling TaxonomyIndexTid::__construct() without the $entity_repository argument is deprecated in drupal:9.1.0 and the $entity_repository argument will be required in drupal:10.0.0. See https://www.drupal.org/node/TBD', E_USER_DEPRECATED); + @trigger_error('Calling TaxonomyIndexTid::__construct() without the $entity_repository argument is deprecated in drupal:9.1.0 and the $entity_repository argument will be required in drupal:10.0.0. See https://www.drupal.org/node/3162414', E_USER_DEPRECATED); $entity_repository = \Drupal::service('entity.repository'); } $this->entityRepository = $entity_repository; @@ -210,7 +210,7 @@ protected function valueForm(&$form, FormStateInterface $form_state) { foreach ($tree as $term) { $choice = new \stdClass(); $choice->option = [ - $term->id() => str_repeat('-', $term->depth) . \Drupal::service('entity.repository') + $term->id() => str_repeat('-', $term->depth) . $this->entityRepository ->getTranslationFromContext($term) ->label(), ]; @@ -399,7 +399,7 @@ public function adminSummary() { $this->value = array_filter($this->value); $terms = Term::loadMultiple($this->value); foreach ($terms as $term) { - $this->valueOptions[$term->id()] = \Drupal::service('entity.repository') + $this->valueOptions[$term->id()] = $this->entityRepository ->getTranslationFromContext($term) ->label(); }