class ContentEntityNullStorage
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php \Drupal\Core\Entity\ContentEntityNullStorage
- 10 core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php \Drupal\Core\Entity\ContentEntityNullStorage
- 8.9.x core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php \Drupal\Core\Entity\ContentEntityNullStorage
Defines a null entity storage.
Used for content entity types that have no storage.
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\Entity\ContentEntityStorageBase implements \Drupal\Core\Entity\ContentEntityStorageInterface, \Drupal\Core\Entity\DynamicallyFieldableEntityStorageInterface, \Drupal\Core\Entity\BundleEntityStorageInterface extends \Drupal\Core\Entity\EntityStorageBase
- class \Drupal\Core\Entity\ContentEntityNullStorage extends \Drupal\Core\Entity\ContentEntityStorageBase
- class \Drupal\Core\Entity\ContentEntityStorageBase implements \Drupal\Core\Entity\ContentEntityStorageInterface, \Drupal\Core\Entity\DynamicallyFieldableEntityStorageInterface, \Drupal\Core\Entity\BundleEntityStorageInterface 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 ContentEntityNullStorage
3 files declare their use of ContentEntityNullStorage
- EntityResourceTestBase.php in core/
modules/ rest/ tests/ src/ Functional/ EntityResource/ EntityResourceTestBase.php - ResourceTestBase.php in core/
modules/ jsonapi/ tests/ src/ Functional/ ResourceTestBase.php - ResourceTypeRepository.php in core/
modules/ jsonapi/ src/ ResourceType/ ResourceTypeRepository.php
File
-
core/
lib/ Drupal/ Core/ Entity/ ContentEntityNullStorage.php, line 12
Namespace
Drupal\Core\EntityView source
class ContentEntityNullStorage extends ContentEntityStorageBase {
/**
* {@inheritdoc}
*/
public function loadMultiple(array $ids = NULL) {
return [];
}
/**
* {@inheritdoc}
*/
protected function doLoadMultiple(array $ids = NULL) {
}
/**
* {@inheritdoc}
*/
public function load($id) {
return NULL;
}
/**
* {@inheritdoc}
*/
public function loadRevision($revision_id) {
return NULL;
}
/**
* {@inheritdoc}
*/
public function loadMultipleRevisions(array $revision_ids) {
return [];
}
/**
* {@inheritdoc}
*/
public function deleteRevision($revision_id) {
}
/**
* {@inheritdoc}
*/
public function loadByProperties(array $values = []) {
return [];
}
/**
* {@inheritdoc}
*/
public function delete(array $entities) {
}
/**
* {@inheritdoc}
*/
protected function doDelete($entities) {
}
/**
* {@inheritdoc}
*/
public function save(EntityInterface $entity) {
}
/**
* {@inheritdoc}
*/
protected function getQueryServiceName() {
return 'entity.query.null';
}
/**
* {@inheritdoc}
*/
protected function doLoadMultipleRevisionsFieldItems($revision_ids) {
return [];
}
/**
* {@inheritdoc}
*/
protected function doSaveFieldItems(ContentEntityInterface $entity, array $names = []) {
}
/**
* {@inheritdoc}
*/
protected function doDeleteFieldItems($entities) {
}
/**
* {@inheritdoc}
*/
protected function doDeleteRevisionFieldItems(ContentEntityInterface $revision) {
}
/**
* {@inheritdoc}
*/
protected function readFieldItemsToPurge(FieldDefinitionInterface $field_definition, $batch_size) {
return [];
}
/**
* {@inheritdoc}
*/
protected function purgeFieldItems(ContentEntityInterface $entity, FieldDefinitionInterface $field_definition) {
}
/**
* {@inheritdoc}
*/
protected function doSave($id, EntityInterface $entity) {
}
/**
* {@inheritdoc}
*/
protected function has($id, EntityInterface $entity) {
}
/**
* {@inheritdoc}
*/
public function countFieldData($storage_definition, $as_bool = FALSE) {
return $as_bool ? FALSE : 0;
}
/**
* {@inheritdoc}
*/
public function hasData() {
return FALSE;
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.