| @@ 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 | ||
| @@ 292-299 (lines=8) @@ | ||
| 289 | */ |
|
| 290 | public function termCreate(\stdClass $term) { |
|
| 291 | // Map vocabulary names to vid, these take precedence over machine names. |
|
| 292 | if (!isset($term->vid)) { |
|
| 293 | $vocabularies = \taxonomy_get_vocabularies(); |
|
| 294 | foreach ($vocabularies as $vid => $vocabulary) { |
|
| 295 | if ($vocabulary->name == $term->vocabulary_machine_name) { |
|
| 296 | $term->vid = $vocabulary->vid; |
|
| 297 | } |
|
| 298 | } |
|
| 299 | } |
|
| 300 | ||
| 301 | if (!isset($term->vid)) { |
|
| 302 | ||