Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $vid = 'hospitals';
- $terms = Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadTree($vid);
- foreach ($terms as $term) {
- $term_data[] = [
- 'tid' => $term->tid,
- 'tname' => $term->name,
- 'image' => ...???.., // image field
- 'contact' => ...???.., // text field
- ];
- }
Add Comment
Please, Sign In to add comment