public function TermHandler::getNidsByTids in Permissions by Term 8
Parameters
array $tids:
Return value
array
File
- src/
Service/ TermHandler.php, line 58
Class
- TermHandler
- Class Term
Namespace
Drupal\permissions_by_term\ServiceCode
public function getNidsByTids($tids) {
if (!empty($tids)) {
$query = $this->database
->select('taxonomy_index', 'ti')
->fields('ti', [
'nid',
])
->condition('ti.tid', $tids, 'IN');
$nids = $query
->execute()
->fetchCol();
return array_unique($nids);
}
else {
return [];
}
}