Security update for Core, with self-updated composer
[yaffs-website] / web / core / modules / taxonomy / src / Entity / Term.php
index 43e62c612b5a39b766aac87d11970e03a31a0738..03491ab96228f103492f31d2e9ffe5762963dd9b 100644 (file)
@@ -46,6 +46,7 @@ use Drupal\taxonomy\TermInterface;
  *     "canonical" = "/taxonomy/term/{taxonomy_term}",
  *     "delete-form" = "/taxonomy/term/{taxonomy_term}/delete",
  *     "edit-form" = "/taxonomy/term/{taxonomy_term}/edit",
+ *     "create" = "/taxonomy/term",
  *   },
  *   permission_granularity = "bundle"
  * )
@@ -229,7 +230,8 @@ class Term extends ContentEntityBase implements TermInterface {
    * {@inheritdoc}
    */
   public function getVocabularyId() {
-    return $this->get('vid')->target_id;
+    @trigger_error('The ' . __METHOD__ . ' method is deprecated since version 8.4.0 and will be removed before 9.0.0. Use ' . __CLASS__ . '::bundle() instead to get the vocabulary ID.', E_USER_DEPRECATED);
+    return $this->bundle();
   }
 
   /**