| @@ 344-351 (lines=8) @@ | ||
| 341 | */ |
|
| 342 | public function termCreate(\stdClass $term) { |
|
| 343 | // Map vocabulary names to vid, these take precedence over machine names. |
|
| 344 | if (!isset($term->vid)) { |
|
| 345 | $vocabularies = \taxonomy_get_vocabularies(); |
|
| 346 | foreach ($vocabularies as $vid => $vocabulary) { |
|
| 347 | if ($vocabulary->name == $term->vocabulary_machine_name) { |
|
| 348 | $term->vid = $vocabulary->vid; |
|
| 349 | } |
|
| 350 | } |
|
| 351 | } |
|
| 352 | ||
| 353 | if (!isset($term->vid)) { |
|
| 354 | ||
| @@ 335-342 (lines=8) @@ | ||
| 332 | */ |
|
| 333 | public function termCreate(\stdClass $term) { |
|
| 334 | // Map vocabulary names to vid, these take precedence over machine names. |
|
| 335 | if (!isset($term->vid)) { |
|
| 336 | $vocabularies = \taxonomy_get_vocabularies(); |
|
| 337 | foreach ($vocabularies as $vid => $vocabulary) { |
|
| 338 | if ($vocabulary->name == $term->vocabulary_machine_name) { |
|
| 339 | $term->vid = $vocabulary->vid; |
|
| 340 | } |
|
| 341 | } |
|
| 342 | } |
|
| 343 | ||
| 344 | if (!isset($term->vid)) { |
|
| 345 | ||