You are here

public function TermHandler::getTermNameById in Permissions by Term 8

Same name and namespace in other branches
  1. 8.2 src/Service/TermHandler.php \Drupal\permissions_by_term\Service\TermHandler::getTermNameById()

Parameters

int $term_id:

Return value

string

File

src/Service/TermHandler.php, line 102

Class

TermHandler
Class Term

Namespace

Drupal\permissions_by_term\Service

Code

public function getTermNameById($term_id) {
  $term_name = \Drupal::entityQuery('taxonomy_term')
    ->condition('id', $term_id)
    ->execute();
  return key($term_name);
}