| @@ 337-344 (lines=8) @@ | ||
| 334 | */ |
|
| 335 | public function termCreate(\stdClass $term) { |
|
| 336 | // Map vocabulary names to vid, these take precedence over machine names. |
|
| 337 | if (!isset($term->vid)) { |
|
| 338 | $vocabularies = \taxonomy_get_vocabularies(); |
|
| 339 | foreach ($vocabularies as $vid => $vocabulary) { |
|
| 340 | if ($vocabulary->name == $term->vocabulary_machine_name) { |
|
| 341 | $term->vid = $vocabulary->vid; |
|
| 342 | } |
|
| 343 | } |
|
| 344 | } |
|
| 345 | ||
| 346 | if (!isset($term->vid)) { |
|
| 347 | ||
| @@ 290-297 (lines=8) @@ | ||
| 287 | */ |
|
| 288 | public function termCreate(\stdClass $term) { |
|
| 289 | // Map vocabulary names to vid, these take precedence over machine names. |
|
| 290 | if (!isset($term->vid)) { |
|
| 291 | $vocabularies = \taxonomy_get_vocabularies(); |
|
| 292 | foreach ($vocabularies as $vid => $vocabulary) { |
|
| 293 | if ($vocabulary->name == $term->vocabulary_machine_name) { |
|
| 294 | $term->vid = $vocabulary->vid; |
|
| 295 | } |
|
| 296 | } |
|
| 297 | } |
|
| 298 | ||
| 299 | if (!isset($term->vid)) { |
|
| 300 | ||