diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTestBase.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTestBase.php index 352504e..0317ad6 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTestBase.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTestBase.php @@ -41,10 +41,9 @@ function createVocabulary() { 'vid' => drupal_strtolower($this->randomName()), 'langcode' => LANGUAGE_NOT_SPECIFIED, 'help' => '', - 'nodes' => array('article' => 'article'), 'weight' => mt_rand(0, 10), )); - taxonomy_vocabulary_save($vocabulary); + $vocabulary->save(); return $vocabulary; } diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php index 907ce87..b459c58 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTranslationUITest.php @@ -54,12 +54,12 @@ protected function setupBundle() { $vocabulary = entity_create('taxonomy_vocabulary', array( 'name' => $this->bundle, 'description' => $this->randomName(), - 'machine_name' => $this->bundle, + 'vid' => $this->bundle, 'langcode' => LANGUAGE_NOT_SPECIFIED, 'help' => '', 'weight' => mt_rand(0, 10), )); - taxonomy_vocabulary_save($vocabulary); + $vocabulary->save(); } /** @@ -73,7 +73,7 @@ function getTranslatorPermissions() { * Overrides \Drupal\translation_entity\Tests\EntityTranslationUITest::createEntity(). */ protected function createEntity($values, $langcode) { - $vocabulary = taxonomy_vocabulary_machine_name_load($this->bundle); + $vocabulary = entity_load('taxonomy_vocabulary', $this->bundle); $values['vid'] = $vocabulary->id(); return parent::createEntity($values, $langcode); } diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 61ff6c6..822f762 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -469,7 +469,7 @@ function taxonomy_check_vocabulary_hierarchy(Vocabulary $vocabulary, $changed_te /** * Saves a term object to the database. * - * @param Drupal\taxonomy\Term $term + * @param Drupal\taxonomy\Plugin\Core\Entity\Term $term * The taxonomy term entity to be saved. * * @return @@ -504,7 +504,7 @@ function taxonomy_term_delete_multiple(array $tids) { /** * Generates an array which displays a term detail page. * - * @param Drupal\taxonomy\Term $term + * @param Drupal\taxonomy\Plugin\Core\Entity\Term $term * A taxonomy term object. * @param string $view_mode * View mode, e.g. 'full', 'teaser'... @@ -573,7 +573,7 @@ function template_preprocess_taxonomy_term(&$variables) { /** * Returns whether the current page is the page of the passed-in term. * - * @param Drupal\taxonomy\Term $term + * @param Drupal\taxonomy\Plugin\Core\Entity\Term $term * A taxonomy term entity. */ function taxonomy_term_is_page(Term $term) { @@ -924,7 +924,7 @@ function taxonomy_vocabulary_load($vid) { * @param $tid * A term's ID * - * @return Drupal\taxonomy\Term|false + * @return Drupal\taxonomy\Plugin\Core\Entity\Term|false * A taxonomy term entity, or FALSE if the term was not found. Results are * statically cached. */ @@ -1243,7 +1243,7 @@ function taxonomy_field_formatter_prepare_view($entity_type, $entities, $field, /** * Title callback for term pages. * - * @param Drupal\taxonomy\Term $term + * @param Drupal\taxonomy\Plugin\Core\Entity\Term $term * A taxonomy term entity. * * @return @@ -1393,7 +1393,7 @@ function taxonomy_node_insert(Node $node) { * The index lists all terms that are related to a given node entity, and is * therefore maintained at the entity level. * - * @param Drupal\node\Node $node + * @param Drupal\node\Plugin\Core\Entity\Node $node * The node entity. */ function taxonomy_build_node_index($node) { @@ -1476,7 +1476,7 @@ function taxonomy_node_predelete(Node $node) { /** * Deletes taxonomy index entries for a given node. * - * @param Drupal\node\Node $node + * @param Drupal\node\Plugin\Core\Entity\Node $node * The node entity. */ function taxonomy_delete_node_index(Node $node) { diff --git a/core/modules/taxonomy/taxonomy.pages.inc b/core/modules/taxonomy/taxonomy.pages.inc index 17aecd6..48ebdbe 100644 --- a/core/modules/taxonomy/taxonomy.pages.inc +++ b/core/modules/taxonomy/taxonomy.pages.inc @@ -12,7 +12,7 @@ /** * Menu callback; displays all nodes associated with a term. * - * @param Drupal\taxonomy\Term $term + * @param Drupal\taxonomy\Plugin\Core\Entity\Term $term * The taxonomy term entity. */ function taxonomy_term_page(Term $term) { @@ -67,7 +67,7 @@ function taxonomy_term_page(Term $term) { /** * Generate the content feed for a taxonomy term. * - * @param Drupal\taxonomy\Term $term + * @param Drupal\taxonomy\Plugin\Core\Entity\Term $term * The taxonomy term entity. */ function taxonomy_term_feed(Term $term) {