Mercurial > hg > isophonics-drupal-site
comparison core/modules/taxonomy/src/VocabularyStorage.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
19 | 19 |
20 /** | 20 /** |
21 * {@inheritdoc} | 21 * {@inheritdoc} |
22 */ | 22 */ |
23 public function getToplevelTids($vids) { | 23 public function getToplevelTids($vids) { |
24 return db_query('SELECT t.tid FROM {taxonomy_term_data} t INNER JOIN {taxonomy_term_hierarchy} th ON th.tid = t.tid WHERE t.vid IN ( :vids[] ) AND th.parent = 0', [':vids[]' => $vids])->fetchCol(); | 24 $tids = \Drupal::entityQuery('taxonomy_term') |
25 ->condition('vid', $vids, 'IN') | |
26 ->condition('parent.target_id', 0) | |
27 ->execute(); | |
28 | |
29 return array_values($tids); | |
25 } | 30 } |
26 | 31 |
27 } | 32 } |