Commit c595d954 authored by catch's avatar catch

Issue #2022509 by Soul88, StephaneQ, hussainweb, lslinnet, andypost,...

Issue #2022509 by Soul88, StephaneQ, hussainweb, lslinnet, andypost, penyaskito, effulgentsia: Deprecate taxonomy_vocabulary_load_multiple() and taxonomy_term_load_multiple() in favour of entity_load_multiple().
parent ddaeac53
......@@ -120,7 +120,7 @@ function createField() {
// Assert the field appears in the "re-use existing field" section for
// different entity types; e.g. if a field was added in a node entity, it
// should also appear in the 'taxonomy term' entity.
$vocabulary = taxonomy_vocabulary_load('tags');
$vocabulary = entity_load('taxonomy_vocabulary', 'tags');
$this->drupalGet('admin/structure/taxonomy/manage/' . $vocabulary->id() . '/fields');
$this->assertTrue($this->xpath('//select[@name="fields[_add_existing_field][field_name]"]//option[@value="' . $this->field_name . '"]'), 'Existing field was found in taxonomy term fields.');
}
......
......@@ -21,7 +21,7 @@ function forum_overview($form, &$form_state) {
$config = config('forum.settings');
$vid = $config->get('vocabulary');
$vocabulary = taxonomy_vocabulary_load($vid);
$vocabulary = entity_load('taxonomy_vocabulary', $vid);
$form = taxonomy_overview_terms($form, $form_state, $vocabulary);
foreach (element_children($form['terms']) as $key) {
......
......@@ -27,11 +27,11 @@ function forum_enable() {
$config = config('forum.settings');
// If the module was disabled only, the current config may contain a valid
// vocabulary ID already.
$vocabulary = taxonomy_vocabulary_load($config->get('vocabulary'));
$vocabulary = entity_load('taxonomy_vocabulary', $config->get('vocabulary'));
if (!$vocabulary) {
// If the module was installed and uninstalled previously, the vocabulary
// with machine name 'forums' might still exist.
$vocabulary = taxonomy_vocabulary_load('forums');
$vocabulary = entity_load('taxonomy_vocabulary', 'forums');
if (!$vocabulary) {
// Otherwise, installing from scratch; create the vocabulary.
$vocabulary = entity_create('taxonomy_vocabulary', array(
......
......@@ -288,7 +288,7 @@ function forum_node_validate(EntityInterface $node, $form) {
unset($node->taxonomy_forums[$langcode][$delta]);
continue;
}
$term = taxonomy_term_load($item['target_id']);
$term = entity_load('taxonomy_term', $item['target_id']);
if (!$term) {
form_set_error('taxonomy_forums', t('Select a forum.'));
continue;
......@@ -678,7 +678,7 @@ function forum_forum_load($tid = NULL) {
// Load and validate the parent term.
if ($tid) {
$forum_term = taxonomy_term_load($tid);
$forum_term = entity_load('taxonomy_term', $tid);
if (!$forum_term || ($forum_term->bundle() != $vid)) {
return $cache[$tid] = FALSE;
}
......
......@@ -47,7 +47,7 @@ function setUp() {
*/
function testTermAlias() {
// Create a term in the default 'Tags' vocabulary with URL alias.
$vocabulary = taxonomy_vocabulary_load('tags');
$vocabulary = entity_load('taxonomy_vocabulary', 'tags');
$description = $this->randomName();
$edit = array(
'name' => $this->randomName(),
......
......@@ -374,7 +374,7 @@ public function testTaxonomyTermHooks() {
));
$_SESSION['entity_crud_hook_test'] = array();
$term = taxonomy_term_load($term->id());
$term = entity_load('taxonomy_term', $term->id());
$this->assertHookMessageOrder(array(
'entity_crud_hook_test_entity_load called for type taxonomy_term',
......@@ -433,7 +433,7 @@ public function testTaxonomyVocabularyHooks() {
));
$_SESSION['entity_crud_hook_test'] = array();
$vocabulary = taxonomy_vocabulary_load($vocabulary->id());
$vocabulary = entity_load('taxonomy_vocabulary', $vocabulary->id());
$this->assertHookMessageOrder(array(
'entity_crud_hook_test_entity_load called for type taxonomy_vocabulary',
......
......@@ -108,7 +108,7 @@ public function testLanguageUpgrade() {
// A langcode property was added to vocabularies and terms. Check that
// existing vocabularies and terms got assigned the site default language.
$vocabulary = taxonomy_vocabulary_load('tags');
$vocabulary = entity_load('taxonomy_vocabulary', 'tags');
$this->assertEqual($vocabulary->langcode, 'ca');
$term = db_query('SELECT * FROM {taxonomy_term_data} WHERE tid = :tid', array(':tid' => 1))->fetchObject();
$this->assertEqual($term->langcode, 'ca');
......
......@@ -1846,7 +1846,7 @@ function hook_mail($key, &$message, $params) {
);
if ($context['hook'] == 'taxonomy') {
$entity = $params['entity'];
$vocabulary = taxonomy_vocabulary_load($entity->id());
$vocabulary = entity_load('taxonomy_vocabulary', $entity->id());
$variables += array(
'%term_name' => $entity->name,
'%term_description' => $entity->description,
......
......@@ -37,7 +37,7 @@ public function prepareView(array $entities, $langcode, array $items) {
}
}
if ($tids) {
$terms = taxonomy_term_load_multiple($tids);
$terms = entity_load_multiple('taxonomy_term', $tids);
// Iterate through the fieldable entities again to attach the loaded term
// data.
......
......@@ -68,7 +68,7 @@ public function settingsSummary() {
public function formElement(FieldInterface $items, $delta, array $element, $langcode, array &$form, array &$form_state) {
$tags = array();
foreach ($items as $item) {
$tags[$item->target_id] = isset($item->taxonomy_term) ? $item->taxonomy_term : taxonomy_term_load($item->target_id);
$tags[$item->target_id] = isset($item->taxonomy_term) ? $item->taxonomy_term : entity_load('taxonomy_term', $item->target_id);
}
$element += array(
'#type' => 'textfield',
......
......@@ -147,7 +147,7 @@ public function query($group_by = FALSE) {
}
function title() {
$term = taxonomy_term_load($this->argument);
$term = entity_load('taxonomy_term', $this->argument);
if (!empty($term)) {
return check_plain($term->label());
}
......
......@@ -25,7 +25,7 @@ class Taxonomy extends Numeric {
function title() {
// There might be no valid argument.
if ($this->argument) {
$term = taxonomy_term_load($this->argument);
$term = entity_load('taxonomy_term', $this->argument);
if (!empty($term)) {
return check_plain($term->label());
}
......
......@@ -20,7 +20,7 @@ class TermFormController extends EntityFormControllerNG {
*/
public function form(array $form, array &$form_state) {
$term = $this->entity;
$vocabulary = taxonomy_vocabulary_load($term->bundle());
$vocabulary = entity_load('taxonomy_vocabulary', $term->bundle());
$parent = array_keys(taxonomy_term_load_parents($term->id()));
$form_state['taxonomy']['parent'] = $parent;
......
......@@ -8,7 +8,7 @@
namespace Drupal\taxonomy\Tests;
/**
* Test the taxonomy_term_load_multiple() function.
* Test the entity_load_multiple() function.
*/
class LoadMultipleTest extends TaxonomyTestBase {
......@@ -28,7 +28,7 @@ function setUp() {
/**
* Create a vocabulary and some taxonomy terms, ensuring they're loaded
* correctly using taxonomy_term_load_multiple().
* correctly using entity_load_multiple().
*/
function testTaxonomyTermMultipleLoad() {
// Create a vocabulary.
......@@ -46,14 +46,14 @@ function testTaxonomyTermMultipleLoad() {
$this->assertEqual($count, 5, format_string('Correct number of terms were loaded. !count terms.', array('!count' => $count)));
// Load the same terms again by tid.
$terms2 = taxonomy_term_load_multiple(array_keys($terms));
$terms2 = entity_load_multiple('taxonomy_term', array_keys($terms));
$this->assertEqual($count, count($terms2), 'Five terms were loaded by tid.');
$this->assertEqual($terms, $terms2, 'Both arrays contain the same terms.');
// Remove one term from the array, then delete it.
$deleted = array_shift($terms2);
$deleted->delete();
$deleted_term = taxonomy_term_load($deleted->id());
$deleted_term = entity_load('taxonomy_term', $deleted->id());
$this->assertFalse($deleted_term);
// Load terms from the vocabulary by vid.
......
......@@ -70,7 +70,7 @@ function testTaxonomyTermHierarchy() {
$term2 = $this->createTerm($this->vocabulary);
// Check that hierarchy is flat.
$vocabulary = taxonomy_vocabulary_load($this->vocabulary->id());
$vocabulary = entity_load('taxonomy_vocabulary', $this->vocabulary->id());
$this->assertEqual(0, $vocabulary->hierarchy, 'Vocabulary is flat.');
// Edit $term2, setting $term1 as parent.
......@@ -85,7 +85,7 @@ function testTaxonomyTermHierarchy() {
$this->assertTrue(isset($parents[$term1->id()]), 'Parent found correctly.');
// Load and save a term, confirming that parents are still set.
$term = taxonomy_term_load($term2->id());
$term = entity_load('taxonomy_term', $term2->id());
$term->save();
$parents = taxonomy_term_load_parents($term2->id());
$this->assertTrue(isset($parents[$term1->id()]), 'Parent found correctly.');
......
......@@ -85,7 +85,7 @@ function testTaxonomyAdminChangingWeights() {
$this->createVocabulary();
}
// Get all vocabularies and change their weights.
$vocabularies = taxonomy_vocabulary_load_multiple();
$vocabularies = entity_load_multiple('taxonomy_vocabulary');
$edit = array();
foreach ($vocabularies as $key => $vocabulary) {
$weight = -$vocabulary->weight;
......@@ -97,7 +97,7 @@ function testTaxonomyAdminChangingWeights() {
// Load the vocabularies from the database.
$this->container->get('plugin.manager.entity')->getStorageController('taxonomy_vocabulary')->resetCache();
$new_vocabularies = taxonomy_vocabulary_load_multiple();
$new_vocabularies = entity_load_multiple('taxonomy_vocabulary');
taxonomy_vocabulary_sort($new_vocabularies);
// Check that the weights are saved in the database correctly.
......@@ -111,12 +111,12 @@ function testTaxonomyAdminChangingWeights() {
*/
function testTaxonomyAdminNoVocabularies() {
// Delete all vocabularies.
$vocabularies = taxonomy_vocabulary_load_multiple();
$vocabularies = entity_load_multiple('taxonomy_vocabulary');
foreach ($vocabularies as $key => $vocabulary) {
$vocabulary->delete();
}
// Confirm that no vocabularies are found in the database.
$this->assertFalse(taxonomy_vocabulary_load_multiple(), 'No vocabularies found.');
$this->assertFalse(entity_load_multiple('taxonomy_vocabulary'), 'No vocabularies found.');
$this->drupalGet('admin/structure/taxonomy');
// Check the default message for no vocabularies.
$this->assertText(t('No vocabularies available.'));
......@@ -137,7 +137,7 @@ function testTaxonomyAdminDeletingVocabulary() {
// Check the created vocabulary.
$this->container->get('plugin.manager.entity')->getStorageController('taxonomy_vocabulary')->resetCache();
$vocabulary = taxonomy_vocabulary_load($vid);
$vocabulary = entity_load('taxonomy_vocabulary', $vid);
$this->assertTrue($vocabulary, 'Vocabulary found.');
// Delete the vocabulary.
......@@ -150,6 +150,6 @@ function testTaxonomyAdminDeletingVocabulary() {
$this->drupalPost(NULL, NULL, t('Delete'));
$this->assertRaw(t('Deleted vocabulary %name.', array('%name' => $vocabulary->name)), 'Vocabulary deleted.');
$this->container->get('plugin.manager.entity')->getStorageController('taxonomy_vocabulary')->resetCache();
$this->assertFalse(taxonomy_vocabulary_load($vid), 'Vocabulary not found.');
$this->assertFalse(entity_load('taxonomy_vocabulary', $vid), 'Vocabulary not found.');
}
}
......@@ -40,7 +40,7 @@ function setUp() {
*/
function testTaxonomyVocabularyDeleteWithTerms() {
// Delete any existing vocabularies.
foreach (taxonomy_vocabulary_load_multiple() as $vocabulary) {
foreach (entity_load_multiple('taxonomy_vocabulary') as $vocabulary) {
$vocabulary->delete();
}
......@@ -73,7 +73,7 @@ function testTaxonomyVocabularyDeleteWithTerms() {
* Ensure that the vocabulary static reset works correctly.
*/
function testTaxonomyVocabularyLoadStaticReset() {
$original_vocabulary = taxonomy_vocabulary_load($this->vocabulary->id());
$original_vocabulary = entity_load('taxonomy_vocabulary', $this->vocabulary->id());
$this->assertTrue(is_object($original_vocabulary), 'Vocabulary loaded successfully.');
$this->assertEqual($this->vocabulary->name, $original_vocabulary->name, 'Vocabulary loaded successfully.');
......@@ -84,13 +84,13 @@ function testTaxonomyVocabularyLoadStaticReset() {
$vocabulary->save();
// Load the vocabulary.
$new_vocabulary = taxonomy_vocabulary_load($original_vocabulary->id());
$new_vocabulary = entity_load('taxonomy_vocabulary', $original_vocabulary->id());
$this->assertEqual($new_vocabulary->name, $vocabulary->name);
$this->assertEqual($new_vocabulary->name, $vocabulary->name);
// Delete the vocabulary.
$this->vocabulary->delete();
$vocabularies = taxonomy_vocabulary_load_multiple();
$vocabularies = entity_load_multiple('taxonomy_vocabulary');
$this->assertTrue(!isset($vocabularies[$this->vocabulary->id()]), 'The vocabulary was deleted.');
}
......@@ -100,7 +100,7 @@ function testTaxonomyVocabularyLoadStaticReset() {
function testTaxonomyVocabularyLoadMultiple() {
// Delete any existing vocabularies.
foreach (taxonomy_vocabulary_load_multiple() as $vocabulary) {
foreach (entity_load_multiple('taxonomy_vocabulary') as $vocabulary) {
$vocabulary->delete();
}
......@@ -120,17 +120,17 @@ function testTaxonomyVocabularyLoadMultiple() {
$names = taxonomy_vocabulary_get_names();
$this->assertEqual($names[$vocabulary1->id()], $vocabulary1->id(), 'Vocabulary 1 name found.');
// Fetch all of the vocabularies using taxonomy_vocabulary_load_multiple().
// Fetch all of the vocabularies using entity_load_multiple().
// Confirm that the vocabularies are ordered by weight.
$vocabularies = taxonomy_vocabulary_load_multiple();
$vocabularies = entity_load_multiple('taxonomy_vocabulary');
taxonomy_vocabulary_sort($vocabularies);
$this->assertEqual(array_shift($vocabularies)->id(), $vocabulary1->id(), 'Vocabulary was found in the vocabularies array.');
$this->assertEqual(array_shift($vocabularies)->id(), $vocabulary2->id(), 'Vocabulary was found in the vocabularies array.');
$this->assertEqual(array_shift($vocabularies)->id(), $vocabulary3->id(), 'Vocabulary was found in the vocabularies array.');
// Fetch the vocabularies with taxonomy_vocabulary_load_multiple(), specifying IDs.
// Fetch the vocabularies with entity_load_multiple(), specifying IDs.
// Ensure they are returned in the same order as the original array.
$vocabularies = taxonomy_vocabulary_load_multiple(array($vocabulary3->id(), $vocabulary2->id(), $vocabulary1->id()));
$vocabularies = entity_load_multiple('taxonomy_vocabulary', array($vocabulary3->id(), $vocabulary2->id(), $vocabulary1->id()));
$this->assertEqual(array_shift($vocabularies)->id(), $vocabulary3->id(), 'Vocabulary loaded successfully by ID.');
$this->assertEqual(array_shift($vocabularies)->id(), $vocabulary2->id(), 'Vocabulary loaded successfully by ID.');
$this->assertEqual(array_shift($vocabularies)->id(), $vocabulary1->id(), 'Vocabulary loaded successfully by ID.');
......
......@@ -404,7 +404,7 @@ function taxonomy_overview_terms_submit($form, &$form_state) {
* @see taxonomy_vocabulary_confirm_reset_alphabetical_submit()
*/
function taxonomy_vocabulary_confirm_reset_alphabetical($form, &$form_state, $vid) {
$vocabulary = taxonomy_vocabulary_load($vid);
$vocabulary = entity_load('taxonomy_vocabulary', $vid);
$form['type'] = array('#type' => 'value', '#value' => 'vocabulary');
$form['vid'] = array('#type' => 'value', '#value' => $vid);
......
......@@ -31,7 +31,7 @@ function hook_taxonomy_vocabulary_create(\Drupal\taxonomy\Plugin\Core\Entity\Voc
* Act on taxonomy vocabularies when loaded.
*
* Modules implementing this hook can act on the vocabulary objects before they
* are returned by taxonomy_vocabulary_load_multiple().
* are returned by entity_load_multiple().
*
* @param array $vocabularies
* An array of taxonomy vocabulary entities.
......@@ -142,7 +142,7 @@ function hook_taxonomy_term_create(\Drupal\taxonomy\Plugin\Core\Entity\Term $ter
* Act on taxonomy terms when loaded.
*
* Modules implementing this hook can act on the term objects returned by
* taxonomy_term_load_multiple().
* entity_load_multiple().
*
* For performance reasons, information to be added to term objects should be
* loaded in a single query for all terms where possible.
......
......@@ -71,7 +71,7 @@ function taxonomy_help($path, $arg) {
$output = '<p>' . t('Taxonomy is for categorizing content. Terms are grouped into vocabularies. For example, a vocabulary called "Fruit" would contain the terms "Apple" and "Banana".') . '</p>';
return $output;
case 'admin/structure/taxonomy/manage/%':
$vocabulary = taxonomy_vocabulary_load($arg[4]);
$vocabulary = entity_load('taxonomy_vocabulary', $arg[4]);
switch ($vocabulary->hierarchy) {
case TAXONOMY_HIERARCHY_DISABLED:
return '<p>' . t('You can reorganize the terms in %capital_name using their drag-and-drop handles, and group terms under a parent term by sliding them under and to the right of the parent.', array('%capital_name' => drupal_ucfirst($vocabulary->name), '%name' => $vocabulary->name)) . '</p>';
......@@ -92,7 +92,7 @@ function taxonomy_permission() {
'title' => t('Administer vocabularies and terms'),
),
);
foreach (taxonomy_vocabulary_load_multiple() as $vocabulary) {
foreach (entity_load_multiple('taxonomy_vocabulary') as $vocabulary) {
$permissions += array(
'edit terms in ' . $vocabulary->id() => array(
'title' => t('Edit terms in %vocabulary', array('%vocabulary' => $vocabulary->name)),
......@@ -420,7 +420,7 @@ function taxonomy_term_view(Term $term, $view_mode = 'full', $langcode = NULL) {
* Constructs a drupal_render() style array from an array of loaded terms.
*
* @param array $terms
* An array of taxonomy terms as returned by taxonomy_term_load_multiple().
* An array of taxonomy terms as returned by entity_load_multiple('taxonomy_term').
* @param string $view_mode
* View mode, e.g. 'full', 'teaser'...
* @param string $langcode
......@@ -551,7 +551,7 @@ function taxonomy_term_load_parents($tid) {
$query->orderBy('t.weight');
$query->orderBy('t.name');
$tids = $query->execute()->fetchCol();
$parents[$tid] = taxonomy_term_load_multiple($tids);
$parents[$tid] = entity_load_multiple('taxonomy_term', $tids);
}
return isset($parents[$tid]) ? $parents[$tid] : array();
......@@ -568,7 +568,7 @@ function taxonomy_term_load_parents_all($tid) {
}
$parents = array();
if ($term = taxonomy_term_load($tid)) {
if ($term = entity_load('taxonomy_term', $tid)) {
$parents[] = $term;
$n = 0;
while ($parent = taxonomy_term_load_parents($parents[$n]->id())) {
......@@ -609,7 +609,7 @@ function taxonomy_term_load_children($tid, $vid = NULL) {
$query->orderBy('t.weight');
$query->orderBy('t.name');
$tids = $query->execute()->fetchCol();
$children[$tid] = taxonomy_term_load_multiple($tids);
$children[$tid] = entity_load_multiple('taxonomy_term', $tids);
}
return isset($children[$tid]) ? $children[$tid] : array();
......@@ -670,7 +670,7 @@ function taxonomy_get_tree($vid, $parent = 0, $max_depth = NULL, $load_entities
// Load full entities, if necessary. The entity controller statically
// caches the results.
if ($load_entities) {
$term_entities = taxonomy_term_load_multiple(array_keys($terms[$vid]));
$term_entities = entity_load_multiple('taxonomy_term', array_keys($terms[$vid]));
}
$max_depth = (!isset($max_depth)) ? count($children[$vid]) : $max_depth;
......@@ -772,6 +772,8 @@ function taxonomy_term_load_multiple_by_name($name, $vocabulary = NULL) {
* @see entity_load_multiple()
* @see Drupal\Core\Entity\Query\EntityQueryInterface
*
* @deprecated use entity_load_multiple('taxonomy_term', $tids) instead.
*
* @param array $tids
* (optional) An array of entity IDs. If omitted, all entities are loaded.
*
......@@ -792,6 +794,8 @@ function taxonomy_term_load_multiple(array $tids = NULL) {
*
* @see entity_load_multiple()
*
* @deprecated use entity_load_multiple('taxonomy_vocabulary', $vids) instead.
*
* @param array $vids
* (optional) An array of entity IDs. If omitted, all entities are loaded.
*
......@@ -817,6 +821,8 @@ function taxonomy_vocabulary_sort(array &$vocabularies = array()) {
/**
* Return the taxonomy vocabulary entity matching a vocabulary ID.
*
* @deprecated use entity_load('taxonomy_vocabulary', $vid) instead.
*
* @param int $vid
* The vocabulary's ID.
*
......@@ -831,6 +837,8 @@ function taxonomy_vocabulary_load($vid) {
/**
* Return the taxonomy term entity matching a term ID.
*
* @deprecated use entity_load('taxonomy_term', $tid) instead.
*
* @param $tid
* A term's ID
*
......@@ -931,14 +939,14 @@ function taxonomy_options_list(FieldDefinitionInterface $field_definition, Entit
*/
function taxonomy_field_validate(EntityInterface $entity = NULL, $field, $instance, $langcode, $items, &$errors) {
// Build an array of existing term IDs so they can be loaded with
// taxonomy_term_load_multiple();
// entity_load_multiple('taxonomy_term');
foreach ($items as $delta => $item) {
if (!empty($item['target_id']) && $item['target_id'] != 'autocreate') {
$tids[] = $item['target_id'];
}
}
if (!empty($tids)) {
$terms = taxonomy_term_load_multiple($tids);
$terms = entity_load_multiple('taxonomy_term', $tids);
// Check each existing item to ensure it can be found in the
// allowed values for this field.
......@@ -998,7 +1006,7 @@ function taxonomy_field_is_empty($item, $field_type) {
function taxonomy_allowed_values(FieldDefinitionInterface $field_definition, EntityInterface $entity) {
$options = array();
foreach ($field_definition->getFieldSetting('allowed_values') as $tree) {
if ($vocabulary = taxonomy_vocabulary_load($tree['vocabulary'])) {
if ($vocabulary = entity_load('taxonomy_vocabulary', $tree['vocabulary'])) {
if ($terms = taxonomy_get_tree($vocabulary->id(), $tree['parent'], NULL, TRUE)) {
foreach ($terms as $term) {
$options[$term->id()] = str_repeat('-', $term->depth) . $term->label();
......@@ -1040,7 +1048,7 @@ function taxonomy_autocomplete_validate($element, &$form_state) {
*/
function taxonomy_field_settings_form($field, $instance) {
// Get proper values for 'allowed_values_function', which is a core setting.
$vocabularies = taxonomy_vocabulary_load_multiple();
$vocabularies = entity_load_multiple('taxonomy_vocabulary');
$options = array();
foreach ($vocabularies as $vocabulary) {
$options[$vocabulary->id()] = $vocabulary->name;
......
......@@ -125,7 +125,7 @@ function taxonomy_tokens($type, $tokens, array $data = array(), array $options =
break;
case 'vocabulary':
$vocabulary = taxonomy_vocabulary_load($term->bundle());
$vocabulary = entity_load('taxonomy_vocabulary', $term->bundle());
$replacements[$original] = check_plain($vocabulary->name);
break;
......@@ -139,7 +139,7 @@ function taxonomy_tokens($type, $tokens, array $data = array(), array $options =
}
if ($vocabulary_tokens = $token_service->findWithPrefix($tokens, 'vocabulary')) {
$vocabulary = taxonomy_vocabulary_load($term->bundle());
$vocabulary = entity_load('taxonomy_vocabulary', $term->bundle());
$replacements += $token_service->generate('vocabulary', $vocabulary_tokens, array('vocabulary' => $vocabulary), $options);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment