diff --git a/core/modules/taxonomy/src/Entity/Vocabulary.php b/core/modules/taxonomy/src/Entity/Vocabulary.php index 1c05388..01ba59f 100644 --- a/core/modules/taxonomy/src/Entity/Vocabulary.php +++ b/core/modules/taxonomy/src/Entity/Vocabulary.php @@ -126,7 +126,15 @@ public function getDescription() { * {@inheritdoc} */ public function getWeight() { - return $this->weight; + return $this->get('weight')->value; + } + + /** + * {@inheritdoc} + */ + public function setWeight($weight) { + $this->set('weight', $weight); + return $this; } /** diff --git a/core/modules/taxonomy/src/VocabularyInterface.php b/core/modules/taxonomy/src/VocabularyInterface.php index 557457f..c917d96 100644 --- a/core/modules/taxonomy/src/VocabularyInterface.php +++ b/core/modules/taxonomy/src/VocabularyInterface.php @@ -45,6 +45,16 @@ 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