Upgraded drupal core with security updates
[yaffs-website] / web / core / modules / taxonomy / src / VocabularyStorage.php
1 <?php
2
3 namespace Drupal\taxonomy;
4
5 use Drupal\Core\Config\Entity\ConfigEntityStorage;
6
7 /**
8  * Defines a storage handler class for taxonomy vocabularies.
9  */
10 class VocabularyStorage extends ConfigEntityStorage implements VocabularyStorageInterface {
11
12   /**
13    * {@inheritdoc}
14    */
15   public function resetCache(array $ids = NULL) {
16     drupal_static_reset('taxonomy_vocabulary_get_names');
17     parent::resetCache($ids);
18   }
19
20   /**
21    * {@inheritdoc}
22    */
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();
25   }
26
27 }