Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

Drupal 9 Get taxonomy term objects by vocabulary machine name vid

try {
  $terms = Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadByProperties(['vid' => 'my_vocablary_machine_name']);
} catch (Exception $e) {
  throw new HttpException(400,'Error upon selection of terms/session_tracks. ' . $e->getMessage());
}
 
PREVIOUS NEXT
Tagged: #Drupal #Get #taxonomy #term #objects #vocabulary #machine #vid
ADD COMMENT
Topic
Name
8+9 =