Created
November 8, 2016 16:24
-
-
Save slivorezka/beedcca7d4da130440724b7ae3a0ca88 to your computer and use it in GitHub Desktop.
Drupal 8: Load term by name
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Load term by name | |
$term = \Drupal::entityTypeManager()->getStorage('taxonomy_term')->loadByProperties(['name' => 'some_name']); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment