function InstallHelper::saveTermId

Same name in other branches
  1. 9 core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php \Drupal\demo_umami_content\InstallHelper::saveTermId()
  2. 8.9.x core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php \Drupal\demo_umami_content\InstallHelper::saveTermId()
  3. 10 core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php \Drupal\demo_umami_content\InstallHelper::saveTermId()

Saves a Term ID generated when saving a taxonomy term.

Parameters

string $vocabulary: Machine name of vocabulary to which it was saved.

int $term_csv_id: The term's ID from the CSV file.

int $tid: Term ID generated when saved in the Drupal database.

1 call to InstallHelper::saveTermId()
InstallHelper::importContentFromFile in core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php
Imports content.

File

core/profiles/demo_umami/modules/demo_umami_content/src/InstallHelper.php, line 233

Class

InstallHelper
Defines a helper class for importing default content.

Namespace

Drupal\demo_umami_content

Code

protected function saveTermId($vocabulary, $term_csv_id, $tid) {
    $this->termIdMap[$vocabulary][$term_csv_id] = $tid;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.