diff --git a/core/modules/taxonomy/src/Entity/Term.php b/core/modules/taxonomy/src/Entity/Term.php index f9bed03..1855dae 100644 --- a/core/modules/taxonomy/src/Entity/Term.php +++ b/core/modules/taxonomy/src/Entity/Term.php @@ -261,7 +261,7 @@ public function getVocabularyId() { /** * {@inheritdoc} */ - public function getDepth() { + public function getTreeDepth() { return $this->depth; } diff --git a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php index b6cf63d..84dd855 100644 --- a/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php +++ b/core/modules/taxonomy/src/Plugin/views/filter/TaxonomyIndexTid.php @@ -137,7 +137,7 @@ protected function valueForm(&$form, &$form_state) { if ($tree) { foreach ($tree as $term) { $choice = new \stdClass(); - $choice->option = array($term->id() => str_repeat('-', $term->getDepth()) . String::checkPlain($term->getTranslatedName())); + $choice->option = array($term->id() => str_repeat('-', $term->getTreeDepth()) . String::checkPlain($term->getTranslatedName())); $options[] = $choice; } } @@ -352,7 +352,7 @@ public function adminSummary() { $this->value = array_filter($this->value); $terms = Term::loadMultiple($this->value); foreach ($terms as $term) { - $this->value_options[$term->id()] = String::checkPlain($term->getTranslatedTerm()); + $this->value_options[$term->id()] = String::checkPlain($term->getTranslatedName()); } } return parent::adminSummary(); diff --git a/core/modules/taxonomy/src/TermInterface.php b/core/modules/taxonomy/src/TermInterface.php index 63bc9bc..faf2081 100644 --- a/core/modules/taxonomy/src/TermInterface.php +++ b/core/modules/taxonomy/src/TermInterface.php @@ -109,6 +109,6 @@ public function getVocabularyId(); * @return int * The depth of the term in the hierarchy; 0 is root level. */ - public function getDepth(); + public function getTreeDepth(); }