3 namespace Drupal\taxonomy;
5 use Drupal\Core\Config\Entity\ConfigEntityStorage;
8 * Defines a storage handler class for taxonomy vocabularies.
10 class VocabularyStorage extends ConfigEntityStorage implements VocabularyStorageInterface {
15 public function resetCache(array $ids = NULL) {
16 drupal_static_reset('taxonomy_vocabulary_get_names');
17 parent::resetCache($ids);
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();