function LayoutTempstoreRepository::getKey
Gets the string to use as the tempstore key.
Parameters
\Drupal\layout_builder\SectionStorageInterface $section_storage: The section storage.
Return value
string A unique string representing the section storage. This should include as much identifying information as possible about this particular storage, including information like the current language.
4 calls to LayoutTempstoreRepository::getKey()
- LayoutTempstoreRepository::delete in core/
modules/ layout_builder/ src/ LayoutTempstoreRepository.php  - Removes the tempstore version of a section storage.
 - LayoutTempstoreRepository::get in core/
modules/ layout_builder/ src/ LayoutTempstoreRepository.php  - Gets the tempstore version of a section storage, if it exists.
 - LayoutTempstoreRepository::has in core/
modules/ layout_builder/ src/ LayoutTempstoreRepository.php  - Checks for the existence of a tempstore version of a section storage.
 - LayoutTempstoreRepository::set in core/
modules/ layout_builder/ src/ LayoutTempstoreRepository.php  - Stores this section storage in tempstore.
 
File
- 
              core/
modules/ layout_builder/ src/ LayoutTempstoreRepository.php, line 122  
Class
- LayoutTempstoreRepository
 - Provides a mechanism for loading layouts from tempstore.
 
Namespace
Drupal\layout_builderCode
protected function getKey(SectionStorageInterface $section_storage) {
  if ($section_storage instanceof TempStoreIdentifierInterface) {
    return $section_storage->getTempstoreKey();
  }
  return $section_storage->getStorageId();
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.