You are here

public function TermHandler::getTidsByNid 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::getTidsByNid()

Parameters

int $nid:

Return value

array

File

src/Service/TermHandler.php, line 44

Class

TermHandler
Class Term

Namespace

Drupal\permissions_by_term\Service

Code

public function getTidsByNid($nid) {
  $query = $this->database
    ->select('taxonomy_index', 'ti')
    ->fields('ti', [
    'tid',
  ])
    ->condition('ti.nid', $nid);
  return $query
    ->execute()
    ->fetchCol();
}