62c62,64 < index 607d4d7..a98d628 100644 --- > old mode 100644 > new mode 100755 > index 607d4d7..b1fe545 76c78 < + $this->assertEqual($vocabulary->getWeight(), 4 + $i); --- > + $this->assertEqual($vocabulary->get('weight'), 4 + $i); 86c88 < + $this->assertEqual($vocabulary->getWeight(), 7); --- > + $this->assertEqual($vocabulary->get('weight'), 7); 106c108 < index 4e98a64..cda4f5f 100644 --- > index 1856f9a..226a9d8 100644 123c125 < index e650551..3a11220 --- > index e650551..a68bbdc 212c214 < @@ -183,4 +139,123 @@ public static function postDelete(EntityStorageInterface $storage, array $entiti --- > @@ -183,4 +139,85 @@ public static function postDelete(EntityStorageInterface $storage, array $entiti 219,233d220 < + public function getWeight() { < + return $this->get('weight'); < + } < + < + /** < + * {@inheritdoc} < + */ < + public function setWeight($weight) { < + $this->set('weight', $weight); < + return $this; < + } < + < + /** < + * {@inheritdoc} < + */ 241,248d227 < + public function setDescription($description) { < + $this->set('description', $description); < + return $this; < + } < + < + /** < + * {@inheritdoc} < + */ 264,278d242 < + public function getVid() { < + return $this->get('vid'); < + } < + < + /** < + * {@inheritdoc} < + */ < + public function setVid($machineName) { < + $this->set('vid', $machineName); < + return $this; < + } < + < + /** < + * {@inheritdoc} < + */ 462c426,428 < index 50d23e8..bdfead0 100644 --- > old mode 100644 > new mode 100755 > index 50d23e8..3c14410 470c436 < + $this->vocabulary->setVid($new_name); --- > + $this->vocabulary->set('vid', $new_name); 541c507,509 < index f265ec2..defab84 100644 --- > old mode 100644 > new mode 100755 > index f265ec2..f292960 556c524 < + $vocabulary->setDescription($this->randomMachineName()); --- > + $vocabulary->set('description', $this->randomMachineName()); 571c539 < + $vocabulary1->setWeight(0); --- > + $vocabulary1->set('weight', 0); 575c543 < + $vocabulary2->setWeight(1); --- > + $vocabulary2->set('weight', 1); 579c547 < + $vocabulary3->setWeight(2); --- > + $vocabulary3->set('weight', 2); 603c571 < + $this->vocabulary->setVid($new_name); --- > + $this->vocabulary->set('vid', $new_name); 608c576,578 < index 134bb36..4d68d09 100644 --- > old mode 100644 > new mode 100755 > index 134bb36..5f55b53 617,618c587,588 < + $weight = -$vocabulary->getWeight(); < + $vocabularies[$key]->setWeight($weight); --- > + $weight = -$vocabulary->get('weight'); > + $vocabularies[$key]->set('weight', $weight); 627c597 < + $this->assertEqual($new_vocabularies[$key]->getWeight(), $vocabularies[$key]->getWeight(), 'The vocabulary weight was changed.'); --- > + $this->assertEqual($new_vocabularies[$key]->get('weight'), $vocabularies[$key]->get('weight'), 'The vocabulary weight was changed.'); 697c667 < index 7eabb9c..462781e --- > index 7eabb9c..e54e52c 700c670 < @@ -15,4 +15,101 @@ --- > @@ -15,4 +15,53 @@ 723,741d692 < + * Sets the vocabulary weight. < + * < + * @param integer $weight < + * The weight of vocabulary. < + * < + * @return \Drupal\taxonomy\VocabularyInterface < + * The called Vocabulary entity. < + */ < + public function setWeight($weight); < + < + /** < + * Returns the vocabulary weight. < + * < + * @return integer < + * The vocabulary weight. < + */ < + public function getWeight(); < + < + /** 765,775d715 < + * Sets the vocabulary description. < + * < + * @param string description < + * The vocabulary description. < + * < + * @return \Drupal\taxonomy\VocabularyInterface < + * The called Vocabulary entity. < + */ < + public function setDescription($description); < + < + /** 783,800d722 < + /** < + * Sets the vocabulary vid. < + * < + * @param string $machineName < + * The vocabulary machine name. < + * < + * @return \Drupal\taxonomy\VocabularyInterface < + * The called Vocabulary entity. < + */ < + public function setVid($machineName); < + < + /** < + * Returns the vocabulary vid. < + * < + * @return string < + * The vocabulary machine name. < + */ < + public function getVid(); 863c785,787 < index 270da71..673fd07 100644 --- > old mode 100644 > new mode 100755 > index 270da71..675aa82 871c795 < + $base_autocomplete_path = 'taxonomy/autocomplete_vid/' . $this->vocabulary->getVid(); --- > + $base_autocomplete_path = 'taxonomy/autocomplete_vid/' . $this->vocabulary->id();