diff --git a/core/modules/taxonomy/src/Entity/Vocabulary.php b/core/modules/taxonomy/src/Entity/Vocabulary.php index 01ba59f..9f6aa3d 100644 --- a/core/modules/taxonomy/src/Entity/Vocabulary.php +++ b/core/modules/taxonomy/src/Entity/Vocabulary.php @@ -132,14 +132,6 @@ public function getWeight() { /** * {@inheritdoc} */ - public function setWeight($weight) { - $this->set('weight', $weight); - return $this; - } - - /** - * {@inheritdoc} - */ public function postSave(EntityStorageInterface $storage, $update = TRUE) { parent::postSave($storage, $update); diff --git a/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateTaxonomyVocabularyTest.php b/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateTaxonomyVocabularyTest.php index 6cbbce1..59e8137 100644 --- a/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateTaxonomyVocabularyTest.php +++ b/core/modules/taxonomy/src/Tests/Migrate/d6/MigrateTaxonomyVocabularyTest.php @@ -43,13 +43,13 @@ public function testTaxonomyVocabulary() { $this->assertIdentical("vocabulary $j (i=$i)", $vocabulary->label()); $this->assertIdentical("description of vocabulary $j (i=$i)", $vocabulary->getDescription()); $this->assertIdentical($i, $vocabulary->getHierarchy()); - $this->assertIdentical(4 + $i, $vocabulary->get('weight')); + $this->assertIdentical(4 + $i, $vocabulary->getWeight()); } $vocabulary = Vocabulary::load('vocabulary_name_much_longer_than'); $this->assertIdentical('vocabulary name much longer than thirty two characters', $vocabulary->label()); $this->assertIdentical('description of vocabulary name much longer than thirty two characters', $vocabulary->getDescription()); $this->assertIdentical(3, $vocabulary->getHierarchy()); - $this->assertIdentical(7, $vocabulary->get('weight')); + $this->assertIdentical(7, $vocabulary->getWeight()); } } diff --git a/core/modules/taxonomy/src/Tests/VocabularyUiTest.php b/core/modules/taxonomy/src/Tests/VocabularyUiTest.php index 029e99d..4f564ac 100644 --- a/core/modules/taxonomy/src/Tests/VocabularyUiTest.php +++ b/core/modules/taxonomy/src/Tests/VocabularyUiTest.php @@ -94,7 +94,7 @@ function testTaxonomyAdminChangingWeights() { $vocabularies = Vocabulary::loadMultiple(); $edit = array(); foreach ($vocabularies as $key => $vocabulary) { - $weight = -$vocabulary->get('weight'); + $weight = -$vocabulary->getWeight(); $vocabularies[$key]->set('weight', $weight); $edit['vocabularies[' . $key . '][weight]'] = $weight; } diff --git a/core/modules/taxonomy/src/VocabularyInterface.php b/core/modules/taxonomy/src/VocabularyInterface.php index c917d96..557457f 100644 --- a/core/modules/taxonomy/src/VocabularyInterface.php +++ b/core/modules/taxonomy/src/VocabularyInterface.php @@ -45,16 +45,6 @@ public function setHierarchy($hierarchy); public function getWeight(); /** - * Gets the weight of vocabulary. - * - * @param int $weight - * The vocabulary weight. - * - * @return $this - */ - public function setWeight($weight); - - /** * Returns the vocabulary description. * * @return string