You are here

public function MixitupFunc::getNodeTids in MixItUp Views 8

Same name and namespace in other branches
  1. 8.2 src/MixitupFunc.php \Drupal\mixitup_views\MixitupFunc::getNodeTids()

Get all node's taxonomy ids.

Parameters

int $nid: Node id.

Return value

array Array of tids.

1 call to MixitupFunc::getNodeTids()
MixitupFunc::getRowClasses in src/MixitupFunc.php
Get classes string for node.

File

src/MixitupFunc.php, line 114

Class

MixitupFunc
Performs assistance functionality.

Namespace

Drupal\mixitup_views

Code

public function getNodeTids($nid) {
  $tids = $this->connection
    ->select('taxonomy_index', 'ti')
    ->fields('ti', [
    'tid',
    'nid',
  ])
    ->condition('ti.nid', $nid)
    ->execute()
    ->fetchAllKeyed();
  return array_keys($tids);
}