class VocabularyStorage
Same name and namespace in other branches
- 11.x core/modules/taxonomy/src/VocabularyStorage.php \Drupal\taxonomy\VocabularyStorage
- 10 core/modules/taxonomy/src/VocabularyStorage.php \Drupal\taxonomy\VocabularyStorage
- 8.9.x core/modules/taxonomy/src/VocabularyStorage.php \Drupal\taxonomy\VocabularyStorage
Defines a storage handler class for taxonomy vocabularies.
Hierarchy
- class \Drupal\Core\Entity\EntityHandlerBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\Core\Entity\EntityStorageBase implements \Drupal\Core\Entity\EntityStorageInterface, \Drupal\Core\Entity\EntityHandlerInterface extends \Drupal\Core\Entity\EntityHandlerBase
- class \Drupal\Core\Config\Entity\ConfigEntityStorage implements \Drupal\Core\Config\Entity\ConfigEntityStorageInterface, \Drupal\Core\Config\Entity\ImportableEntityStorageInterface extends \Drupal\Core\Entity\EntityStorageBase
- class \Drupal\taxonomy\VocabularyStorage implements \Drupal\taxonomy\VocabularyStorageInterface extends \Drupal\Core\Config\Entity\ConfigEntityStorage
- class \Drupal\Core\Config\Entity\ConfigEntityStorage implements \Drupal\Core\Config\Entity\ConfigEntityStorageInterface, \Drupal\Core\Config\Entity\ImportableEntityStorageInterface extends \Drupal\Core\Entity\EntityStorageBase
- class \Drupal\Core\Entity\EntityStorageBase implements \Drupal\Core\Entity\EntityStorageInterface, \Drupal\Core\Entity\EntityHandlerInterface extends \Drupal\Core\Entity\EntityHandlerBase
Expanded class hierarchy of VocabularyStorage
File
-
core/
modules/ taxonomy/ src/ VocabularyStorage.php, line 10
Namespace
Drupal\taxonomyView source
class VocabularyStorage extends ConfigEntityStorage implements VocabularyStorageInterface {
/**
* {@inheritdoc}
*/
public function getToplevelTids($vids) {
$tids = \Drupal::entityQuery('taxonomy_term')->accessCheck(TRUE)
->condition('vid', $vids, 'IN')
->condition('parent.target_id', 0)
->execute();
return array_values($tids);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.