class VocabularyStorage

Same name and namespace in other branches
  1. 11.x core/modules/taxonomy/src/VocabularyStorage.php \Drupal\taxonomy\VocabularyStorage
  2. 10 core/modules/taxonomy/src/VocabularyStorage.php \Drupal\taxonomy\VocabularyStorage
  3. 9 core/modules/taxonomy/src/VocabularyStorage.php \Drupal\taxonomy\VocabularyStorage
  4. 8.9.x core/modules/taxonomy/src/VocabularyStorage.php \Drupal\taxonomy\VocabularyStorage

Defines a storage handler class for taxonomy vocabularies.

Hierarchy

Expanded class hierarchy of VocabularyStorage

1 file declares its use of VocabularyStorage
Vocabulary.php in core/modules/taxonomy/src/Entity/Vocabulary.php

File

core/modules/taxonomy/src/VocabularyStorage.php, line 10

Namespace

Drupal\taxonomy
View 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);
  }

}

Members

Title Sort descending Modifiers Object type Summary Overriden Title
ConfigEntityStorage::$configFactory protected property The config factory service.
ConfigEntityStorage::$configStorage protected property The config storage service.
ConfigEntityStorage::$languageManager protected property The language manager.
ConfigEntityStorage::$overrideFree protected property Determines if the underlying configuration is retrieved override free.
ConfigEntityStorage::$uuidKey protected property
ConfigEntityStorage::buildCacheId protected function
ConfigEntityStorage::createFromStorageRecord public function
ConfigEntityStorage::createInstance public static function
ConfigEntityStorage::doCreate protected function
ConfigEntityStorage::doDelete protected function
ConfigEntityStorage::doLoadMultiple protected function
ConfigEntityStorage::doSave protected function
ConfigEntityStorage::getIDFromConfigName public static function
ConfigEntityStorage::getPrefix protected function Returns the prefix used to create the configuration name.
ConfigEntityStorage::getQueryServiceName protected function
ConfigEntityStorage::has protected function
ConfigEntityStorage::hasData public function
ConfigEntityStorage::importCreate public function
ConfigEntityStorage::importDelete public function
ConfigEntityStorage::importRename public function
ConfigEntityStorage::importUpdate public function
ConfigEntityStorage::invokeHook protected function Invokes a hook on behalf of the entity.
ConfigEntityStorage::loadMultipleOverrideFree public function
ConfigEntityStorage::loadOverrideFree public function
ConfigEntityStorage::mapToStorageRecord protected function Maps from an entity object to the storage record.
ConfigEntityStorage::MAX_ID_LENGTH constant Length limit of the configuration entity ID.
ConfigEntityStorage::resetCache public function
ConfigEntityStorage::save public function Implements Drupal\Core\Entity\EntityStorageInterface::save().
ConfigEntityStorage::updateFromStorageRecord public function
ConfigEntityStorage::_doCreateFromStorageRecord protected function Helps create a configuration entity from storage values.
ConfigEntityStorage::__construct public function Constructs a ConfigEntityStorage object.
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function
DependencySerializationTrait::__wakeup public function
EntityHandlerBase::$moduleHandler protected property The module handler to invoke hooks on.
EntityHandlerBase::moduleHandler protected function Gets the module handler.
EntityHandlerBase::setModuleHandler public function Sets the module handler for this handler.
EntityStorageBase::$baseEntityClass private property Name of the base entity class.
EntityStorageBase::$entityIdsToLoad protected property Entity IDs awaiting loading.
EntityStorageBase::$entityType protected property Information about the entity type.
EntityStorageBase::$entityTypeId protected property Entity type ID for this storage.
EntityStorageBase::$idKey protected property Name of the entity's ID field in the entity database table.
EntityStorageBase::$langcodeKey protected property The name of the entity langcode property.
EntityStorageBase::$memoryCache protected property The memory cache.
EntityStorageBase::$memoryCacheTag protected property The memory cache tag.
EntityStorageBase::$uuidService protected property The UUID service.
EntityStorageBase::buildPropertyQuery protected function Builds an entity query.
EntityStorageBase::create public function
EntityStorageBase::delete public function
EntityStorageBase::doPostSave protected function Performs post save entity processing.
EntityStorageBase::doPreSave protected function Performs presave entity processing.
EntityStorageBase::getAggregateQuery public function
EntityStorageBase::getEntitiesByClass protected function Indexes the given array of entities by their class name and ID.
EntityStorageBase::getEntityClass public function
EntityStorageBase::getEntityType public function
EntityStorageBase::getEntityTypeId public function
EntityStorageBase::getFromStaticCache protected function Gets entities from the static cache.
EntityStorageBase::getQuery public function
EntityStorageBase::load public function
EntityStorageBase::loadByProperties public function
EntityStorageBase::loadMultiple public function
EntityStorageBase::loadUnchanged public function
EntityStorageBase::mapFromStorageRecords protected function Maps from storage records to entity objects.
EntityStorageBase::postLoad protected function Attaches data to entities upon loading.
EntityStorageBase::preLoad protected function Gathers entities from a 'preload' step.
EntityStorageBase::restore public function
EntityStorageBase::setStaticCache protected function Stores entities in the static entity cache.
EntityStorageInterface::FIELD_LOAD_CURRENT constant Load the most recent version of an entity's field data.
EntityStorageInterface::FIELD_LOAD_REVISION constant Load the version of an entity's field data specified in the entity.
StringTranslationTrait::$stringTranslation protected property The string translation service.
StringTranslationTrait::formatPlural protected function Formats a string containing a count of items.
StringTranslationTrait::getNumberOfPlurals protected function Returns the number of plurals supported by a given language.
StringTranslationTrait::getStringTranslation protected function Gets the string translation service.
StringTranslationTrait::setStringTranslation public function Sets the string translation service to use.
StringTranslationTrait::t protected function Translates a string to the current language or to a given language.
VocabularyStorage::getToplevelTids public function Gets top-level term IDs of vocabularies. Overrides VocabularyStorageInterface::getToplevelTids

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.