class LayoutBuilderEntityViewDisplayStorage
Same name and namespace in other branches
- 11.x core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplayStorage.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplayStorage
Provides storage for entity view display entities that have layouts.
@internal Entity handlers are internal.
Hierarchy
- class \Drupal\Core\Entity\EntityHandlerBase uses \Drupal\Core\StringTranslation\StringTranslationTrait, \Drupal\Core\DependencyInjection\DependencySerializationTrait
- class \Drupal\Core\Entity\EntityStorageBase extends \Drupal\Core\Entity\EntityStorageInterface, \Drupal\Core\Entity\EntityHandlerInterface implements \Drupal\Core\Entity\EntityHandlerBase
- class \Drupal\Core\Config\Entity\ConfigEntityStorage extends \Drupal\Core\Config\Entity\ConfigEntityStorageInterface, \Drupal\Core\Config\Entity\ImportableEntityStorageInterface implements \Drupal\Core\Entity\EntityStorageBase
- class \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplayStorage implements \Drupal\Core\Config\Entity\ConfigEntityStorage
- class \Drupal\Core\Config\Entity\ConfigEntityStorage extends \Drupal\Core\Config\Entity\ConfigEntityStorageInterface, \Drupal\Core\Config\Entity\ImportableEntityStorageInterface implements \Drupal\Core\Entity\EntityStorageBase
- class \Drupal\Core\Entity\EntityStorageBase extends \Drupal\Core\Entity\EntityStorageInterface, \Drupal\Core\Entity\EntityHandlerInterface implements \Drupal\Core\Entity\EntityHandlerBase
Expanded class hierarchy of LayoutBuilderEntityViewDisplayStorage
1 file declares its use of LayoutBuilderEntityViewDisplayStorage
- layout_builder.module in core/
modules/ layout_builder/ layout_builder.module - Provides hook implementations for Layout Builder.
File
-
core/
modules/ layout_builder/ src/ Entity/ LayoutBuilderEntityViewDisplayStorage.php, line 15
Namespace
Drupal\layout_builder\EntityView source
class LayoutBuilderEntityViewDisplayStorage extends ConfigEntityStorage {
/**
* {@inheritdoc}
*/
protected function mapToStorageRecord(EntityInterface $entity) {
$record = parent::mapToStorageRecord($entity);
if (!empty($record['third_party_settings']['layout_builder']['sections'])) {
$record['third_party_settings']['layout_builder']['sections'] = array_map(function (Section $section) {
return $section->toArray();
}, $record['third_party_settings']['layout_builder']['sections']);
}
return $record;
}
/**
* {@inheritdoc}
*/
protected function mapFromStorageRecords(array $records) {
foreach ($records as &$record) {
if (!empty($record['third_party_settings']['layout_builder']['sections'])) {
$sections =& $record['third_party_settings']['layout_builder']['sections'];
$sections = array_map([
Section::class,
'fromArray',
], $sections);
}
}
return parent::mapFromStorageRecords($records);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title | Overrides |
---|---|---|---|---|---|
ConfigEntityStorage::$configFactory | protected | property | The config factory service. | ||
ConfigEntityStorage::$configFactory | protected | property | The config factory service. | ||
ConfigEntityStorage::$configStorage | protected | property | The config storage service. | ||
ConfigEntityStorage::$configStorage | protected | property | The config storage service. | ||
ConfigEntityStorage::$languageManager | protected | property | The language manager. | ||
ConfigEntityStorage::$languageManager | protected | property | The language manager. | ||
ConfigEntityStorage::$overrideFree | protected | property | Determines if the underlying configuration is retrieved override free. | ||
ConfigEntityStorage::$overrideFree | protected | property | Determines if the underlying configuration is retrieved override free. | ||
ConfigEntityStorage::$uuidKey | protected | property | |||
ConfigEntityStorage::$uuidKey | protected | property | |||
ConfigEntityStorage::buildCacheId | protected | function | |||
ConfigEntityStorage::createFromStorageRecord | public | function | |||
ConfigEntityStorage::createInstance | public static | function | 2 | ||
ConfigEntityStorage::createInstance | public static | function | 2 | ||
ConfigEntityStorage::deleteRevision | public | 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 | 1 | ||
ConfigEntityStorage::importDelete | public | function | 1 | ||
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::loadMultipleOverrideFree | public | function | |||
ConfigEntityStorage::loadOverrideFree | public | function | |||
ConfigEntityStorage::loadOverrideFree | public | function | |||
ConfigEntityStorage::loadRevision | public | function | |||
ConfigEntityStorage::MAX_ID_LENGTH | constant | Length limit of the configuration entity ID. | |||
ConfigEntityStorage::MAX_ID_LENGTH | constant | Length limit of the configuration entity ID. | |||
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. | 2 | |
ConfigEntityStorage::__construct | public | function | Constructs a ConfigEntityStorage object. | 2 | |
DependencySerializationTrait::$_entityStorages | protected | property | An array of entity type IDs keyed by the property name of their storages. | ||
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::$_serviceIds | protected | property | An array of service IDs keyed by property name used for serialization. | ||
DependencySerializationTrait::__sleep | public | function | |||
DependencySerializationTrait::__sleep | public | function | |||
DependencySerializationTrait::__wakeup | public | function | #[\ReturnTypeWillChange] | ||
DependencySerializationTrait::__wakeup | public | function | #[\ReturnTypeWillChange] | ||
EntityHandlerBase::$moduleHandler | protected | property | The module handler to invoke hooks on. | 1 | |
EntityHandlerBase::$moduleHandler | protected | property | The module handler to invoke hooks on. | 1 | |
EntityHandlerBase::$moduleHandler | protected | property | The module handler to invoke hooks on. | 1 | |
EntityHandlerBase::$moduleHandler | protected | property | The module handler to invoke hooks on. | 1 | |
EntityHandlerBase::moduleHandler | protected | function | Gets the module handler. | 1 | |
EntityHandlerBase::moduleHandler | protected | function | Gets the module handler. | 1 | |
EntityHandlerBase::moduleHandler | protected | function | Gets the module handler. | 1 | |
EntityHandlerBase::moduleHandler | protected | function | Gets the module handler. | 1 | |
EntityHandlerBase::setModuleHandler | public | function | Sets the module handler for this handler. | ||
EntityHandlerBase::setModuleHandler | public | function | Sets the module handler for this handler. | ||
EntityStorageBase::$baseEntityClass | private | property | Name of the base entity class. | ||
EntityStorageBase::$baseEntityClass | private | property | Name of the base entity class. | ||
EntityStorageBase::$entityType | protected | property | Information about the entity type. | ||
EntityStorageBase::$entityType | protected | property | Information about the entity type. | ||
EntityStorageBase::$entityTypeId | protected | property | Entity type ID for this storage. | ||
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::$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. | 1 | |
EntityStorageBase::$langcodeKey | protected | property | The name of the entity langcode property. | 1 | |
EntityStorageBase::$langcodeKey | protected | property | The name of the entity langcode property. | 1 | |
EntityStorageBase::$langcodeKey | protected | property | The name of the entity langcode property. | 1 | |
EntityStorageBase::$memoryCache | protected | property | The memory cache. | ||
EntityStorageBase::$memoryCache | protected | property | The memory cache. | ||
EntityStorageBase::$memoryCacheTag | protected | property | The memory cache tag. | ||
EntityStorageBase::$memoryCacheTag | protected | property | The memory cache tag. | ||
EntityStorageBase::$uuidService | protected | property | The UUID service. | ||
EntityStorageBase::$uuidService | protected | property | The UUID service. | ||
EntityStorageBase::buildPropertyQuery | protected | function | Builds an entity query. | 1 | |
EntityStorageBase::buildPropertyQuery | protected | function | Builds an entity query. | 1 | |
EntityStorageBase::buildPropertyQuery | protected | function | Builds an entity query. | 1 | |
EntityStorageBase::buildPropertyQuery | protected | function | Builds an entity query. | 1 | |
EntityStorageBase::create | public | function | |||
EntityStorageBase::create | public | function | |||
EntityStorageBase::delete | public | function | 1 | ||
EntityStorageBase::delete | public | function | 1 | ||
EntityStorageBase::delete | public | function | 1 | ||
EntityStorageBase::delete | public | function | 1 | ||
EntityStorageBase::doPostSave | protected | function | Performs post save entity processing. | ||
EntityStorageBase::doPostSave | protected | function | Performs post save entity processing. | ||
EntityStorageBase::doPreSave | protected | function | Performs presave entity processing. | ||
EntityStorageBase::doPreSave | protected | function | Performs presave entity processing. | ||
EntityStorageBase::getAggregateQuery | public | function | |||
EntityStorageBase::getAggregateQuery | public | function | |||
EntityStorageBase::getEntitiesByClass | protected | function | Indexes the given array of entities by their class name and ID. | ||
EntityStorageBase::getEntitiesByClass | protected | function | Indexes the given array of entities by their class name and ID. | ||
EntityStorageBase::getEntityClass | public | function | |||
EntityStorageBase::getEntityClass | public | function | |||
EntityStorageBase::getEntityType | public | function | |||
EntityStorageBase::getEntityType | public | function | |||
EntityStorageBase::getEntityTypeId | public | function | |||
EntityStorageBase::getEntityTypeId | public | function | |||
EntityStorageBase::getFromStaticCache | protected | function | Gets entities from the static cache. | ||
EntityStorageBase::getFromStaticCache | protected | function | Gets entities from the static cache. | ||
EntityStorageBase::getQuery | public | function | |||
EntityStorageBase::getQuery | public | function | |||
EntityStorageBase::load | public | function | |||
EntityStorageBase::load | public | function | |||
EntityStorageBase::loadByProperties | public | function | 2 | ||
EntityStorageBase::loadByProperties | public | function | 2 | ||
EntityStorageBase::loadByProperties | public | function | 2 | ||
EntityStorageBase::loadByProperties | public | function | 2 | ||
EntityStorageBase::loadMultiple | public | function | |||
EntityStorageBase::loadMultiple | public | function | |||
EntityStorageBase::loadUnchanged | public | function | |||
EntityStorageBase::loadUnchanged | public | function | |||
EntityStorageBase::postLoad | protected | function | Attaches data to entities upon loading. | ||
EntityStorageBase::postLoad | protected | function | Attaches data to entities upon loading. | ||
EntityStorageBase::preLoad | protected | function | Gathers entities from a 'preload' step. | ||
EntityStorageBase::preLoad | protected | function | Gathers entities from a 'preload' step. | ||
EntityStorageBase::resetCache | public | function | |||
EntityStorageBase::resetCache | public | function | |||
EntityStorageBase::restore | public | function | 1 | ||
EntityStorageBase::restore | public | function | 1 | ||
EntityStorageBase::restore | public | function | 1 | ||
EntityStorageBase::restore | public | function | 1 | ||
EntityStorageBase::setStaticCache | protected | function | Stores entities in the static entity cache. | ||
EntityStorageBase::setStaticCache | protected | function | Stores entities in the static entity cache. | ||
EntityStorageBase::__get | public | function | Warns subclasses not to directly access the deprecated entityClass property. | ||
EntityStorageBase::__get | public | function | Warns subclasses not to directly access the deprecated entityClass property. | ||
EntityStorageBase::__set | public | function | Warns subclasses not to directly set the deprecated entityClass property. | ||
EntityStorageBase::__set | public | function | Warns subclasses not to directly set the deprecated entityClass property. | ||
EntityStorageInterface::FIELD_LOAD_CURRENT | constant | Load the most recent version of an entity's field data. | |||
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. | |||
EntityStorageInterface::FIELD_LOAD_REVISION | constant | Load the version of an entity's field data specified in the entity. | |||
LayoutBuilderEntityViewDisplayStorage::mapFromStorageRecords | protected | function | Maps from storage records to entity objects. | Overrides EntityStorageBase::mapFromStorageRecords | |
LayoutBuilderEntityViewDisplayStorage::mapToStorageRecord | protected | function | Maps from an entity object to the storage record. | Overrides ConfigEntityStorage::mapToStorageRecord | |
StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | ||
StringTranslationTrait::$stringTranslation | protected | property | The string translation service. | ||
StringTranslationTrait::formatPlural | protected | function | Formats a string containing a count of items. | ||
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::getNumberOfPlurals | protected | function | Returns the number of plurals supported by a given language. | ||
StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | ||
StringTranslationTrait::getStringTranslation | protected | function | Gets the string translation service. | ||
StringTranslationTrait::setStringTranslation | public | function | Sets the string translation service to use. | ||
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. | ||
StringTranslationTrait::t | protected | function | Translates a string to the current language or to a given language. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.