public static function getTidFromTermName($term_name, $vocab_name) {
    $tid = -1;
    if ($terms = taxonomy_term_load_multiple_by_name($term_name, $vocab_name)) {
      $term = reset($terms);
      $tid = $term->id();
    }

    return $tid;
  }