| @@ 332-339 (lines=8) @@ | ||
| 329 | */ |
|
| 330 | public function termCreate(\stdClass $term) { |
|
| 331 | // Map vocabulary names to vid, these take precedence over machine names. |
|
| 332 | if (!isset($term->vid)) { |
|
| 333 | $vocabularies = \taxonomy_get_vocabularies(); |
|
| 334 | foreach ($vocabularies as $vid => $vocabulary) { |
|
| 335 | if ($vocabulary->name == $term->vocabulary_machine_name) { |
|
| 336 | $term->vid = $vocabulary->vid; |
|
| 337 | } |
|
| 338 | } |
|
| 339 | } |
|
| 340 | ||
| 341 | if (!isset($term->vid)) { |
|
| 342 | ||
| @@ 285-292 (lines=8) @@ | ||
| 282 | */ |
|
| 283 | public function termCreate(\stdClass $term) { |
|
| 284 | // Map vocabulary names to vid, these take precedence over machine names. |
|
| 285 | if (!isset($term->vid)) { |
|
| 286 | $vocabularies = \taxonomy_get_vocabularies(); |
|
| 287 | foreach ($vocabularies as $vid => $vocabulary) { |
|
| 288 | if ($vocabulary->name == $term->vocabulary_machine_name) { |
|
| 289 | $term->vid = $vocabulary->vid; |
|
| 290 | } |
|
| 291 | } |
|
| 292 | } |
|
| 293 | ||
| 294 | if (!isset($term->vid)) { |
|
| 295 | ||