| @@ 356-363 (lines=8) @@ | ||
| 353 | */ |
|
| 354 | public function termCreate(\stdClass $term) { |
|
| 355 | // Map vocabulary names to vid, these take precedence over machine names. |
|
| 356 | if (!isset($term->vid)) { |
|
| 357 | $vocabularies = \taxonomy_get_vocabularies(); |
|
| 358 | foreach ($vocabularies as $vid => $vocabulary) { |
|
| 359 | if ($vocabulary->name == $term->vocabulary_machine_name) { |
|
| 360 | $term->vid = $vocabulary->vid; |
|
| 361 | } |
|
| 362 | } |
|
| 363 | } |
|
| 364 | ||
| 365 | if (!isset($term->vid)) { |
|
| 366 | ||
| @@ 386-393 (lines=8) @@ | ||
| 383 | */ |
|
| 384 | public function termCreate(\stdClass $term) { |
|
| 385 | // Map vocabulary names to vid, these take precedence over machine names. |
|
| 386 | if (!isset($term->vid)) { |
|
| 387 | $vocabularies = \taxonomy_get_vocabularies(); |
|
| 388 | foreach ($vocabularies as $vid => $vocabulary) { |
|
| 389 | if ($vocabulary->name == $term->vocabulary_machine_name) { |
|
| 390 | $term->vid = $vocabulary->vid; |
|
| 391 | } |
|
| 392 | } |
|
| 393 | } |
|
| 394 | ||
| 395 | if (!isset($term->vid)) { |
|
| 396 | ||