How to load taxonomy term by name in Drupal 8

Posted by admin on Fri, 01/19/2018 - 14:57

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]);
×

Hey! Don't miss a new cool stuff!

Comments

Smandajax (not verified)

https://buysildenshop.com/ - Viagra

gasiart (not verified)

http://buypropeciaon.com/ - prescriptions for propecia in nj

propecia amazon (not verified)

Cialis Hace Dano

Cigilleby (not verified)

buy cialis online

Choiree (not verified)

https://buytadalafshop.com/ - buy cialis pills

TeabsbevE (not verified)

Stromectol

Stromectol (not verified)

Priligy Generico Sin Receta

buy canadian fi... (not verified)

Authentic Cialis

gasiart (not verified)

http://buypropeciaon.com/ - Propecia

Choiree (not verified)

http://buytadalafshop.com/ - Cialis

durvet ivermectin (not verified)

Cytotec 5 Mg

Cigilleby (not verified)

Cialis

buy online cialis (not verified)

Want to buy isotretinoin us free shipping

Stromectol (not verified)

Prednisone Without A Script

TeabsbevE (not verified)

ivermectin tablet online purchase

buy cialis online (not verified)

Super Kamagra Gunstig

Lyclolf (not verified)

https://buystromectolon.com/ - ivermectin for dogs dosage

Cialis (not verified)

cialis 20 le prix

Lyclolf (not verified)

http://buystromectolon.com/ - Stromectol

Stromectol (not verified)

Purchase Discount Doxycycline

Henrytrief (not verified)

gay only dating sites
is dating a trans gay
2021 gay dating website free

Envecehem (not verified)

furosemide nursing implications

Zithromax (not verified)

Kamagra Gunstig Kaufen

Graiveada (not verified)

http://buylasixshop.com/ - Lasix

Plaquenil (not verified)

how long does cialis take

Graiveada (not verified)

https://buylasixshop.com/ - Lasix

Zithromax (not verified)

Cialis 5 Mg Vs Viagra

Whasksaks (not verified)

http://buyplaquenilcv.com/ - withdrawal symptoms of plaquenil

plaquenil for corona (not verified)

viagra gibraltar

zithromax pregnant (not verified)

Viagra Generico Natural

Agobben (not verified)

https://buyzithromaxinf.com/ - Zithromax

Arerrot (not verified)

Zithromax

Envecehem (not verified)

furosemide tablets 40 mg

ethipvoto (not verified)

Priligy

Arerrot (not verified)

Zithromax

Whasksaks (not verified)

http://buyplaquenilcv.com/ - plaquenil stock

Arerrot (not verified)

Zithromax

Lasix (not verified)

Viagra Comment Procurer

Graiveada (not verified)

https://buylasixshop.com/ - Lasix

Trubbebra (not verified)

http://buypriligyhop.com/ - Priligy

moduretic (not verified)

Clomid Pour Carte Des Hommes

ethipvoto (not verified)

Priligy

Whasksaks (not verified)

http://buyplaquenilcv.com/ - Plaquenil

Trubbebra (not verified)

https://buypriligyhop.com/ - buy priligy 30 mg x 10 pill

Lasix (not verified)

cialis acheter pas cher

Graiveada (not verified)

https://buylasixshop.com/ - cheap lasix 40 mg

Trubbebra (not verified)

http://buypriligyhop.com/ - priligy ebay

ethipvoto (not verified)

Priligy

abejessah (not verified)

does plaquenil cause weight gain

Lasix (not verified)

prix du cialis 20 mg

Add new comment