You are here

public function TermHandler::getTermNameById in Permissions by Term 8.2

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

Parameters

int $term_id:

Return value

string

File

src/Service/TermHandler.php, line 140

Class

TermHandler

Namespace

Drupal\permissions_by_term\Service

Code

public function getTermNameById($term_id) {
  $term_name = $this->termStorage
    ->getQuery()
    ->condition('id', $term_id)
    ->execute();
  return key($term_name);
}