function OverridesSectionStorage::getTempstoreKey
Overrides SectionStorageBase::getTempstoreKey
File
-
core/
modules/ layout_builder/ src/ Plugin/ SectionStorage/ OverridesSectionStorage.php, line 159
Class
- OverridesSectionStorage
- Defines the 'overrides' section storage type.
Namespace
Drupal\layout_builder\Plugin\SectionStorageCode
public function getTempstoreKey() {
$key = parent::getTempstoreKey();
$key .= '.' . $this->getContextValue('view_mode');
$entity = $this->getEntity();
// @todo Allow entities to provide this contextual information in
// https://www.drupal.org/project/drupal/issues/3026957.
if ($entity instanceof TranslatableInterface) {
$key .= '.' . $entity->language()
->getId();
}
return $key;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.