Code snippet to load taxonomy term by name (or any otehr property) in Drupal 8.
$term_name = 'Your Term Name'; $term = \Drupal::entityTypeManager() ->getStorage('taxonomy_term') ->loadByProperties(['name' => $term_name]);
If you want to use vid and name - just add that to properties array like this:
$term_name = 'Your Term Name'; $vid = 3; $term = \Drupal::entityTypeManager() ->getStorage('taxonomy_term') ->loadByProperties(['name' => $term_name, 'vid' => $vid]);
×
Comments
Where Can Buy Viagra Cheapest Price
Il Cialis Funziona
Legally Provera Without Dr Approval
Legally Provera Without Dr Approval
Buy Kamagra Jelly
Cialisonline4all Online Pharmacy Review
Acquistare Cialis Con Postepay
Il Cialis E Mutuabile
Maradona Propecia
Cialis Samples
Amoxicillin Without Prescriptions
Vendita Viagra Pisa
Cialis Comprar Precio
Priligy 30 Mg Vademecum
Cephalexin Pain When Urinating
Cialis Ricetta Online
Where To Order Finasteride
Cats On Amoxicillin
Kamagra Review
pages jaunes levitra
Cephalexin Dosage Pneumonia