function LayoutTempstoreRepository::getTempstore
Same name in other branches
- 8.9.x core/modules/layout_builder/src/LayoutTempstoreRepository.php \Drupal\layout_builder\LayoutTempstoreRepository::getTempstore()
- 10 core/modules/layout_builder/src/LayoutTempstoreRepository.php \Drupal\layout_builder\LayoutTempstoreRepository::getTempstore()
- 11.x core/modules/layout_builder/src/LayoutTempstoreRepository.php \Drupal\layout_builder\LayoutTempstoreRepository::getTempstore()
Gets the shared tempstore.
Parameters
\Drupal\layout_builder\SectionStorageInterface $section_storage: The section storage.
Return value
\Drupal\Core\TempStore\SharedTempStore The tempstore.
File
-
core/
modules/ layout_builder/ src/ LayoutTempstoreRepository.php, line 80
Class
- LayoutTempstoreRepository
- Provides a mechanism for loading layouts from tempstore.
Namespace
Drupal\layout_builderCode
protected function getTempstore(SectionStorageInterface $section_storage) {
$collection = 'layout_builder.section_storage.' . $section_storage->getStorageType();
return $this->tempStoreFactory
->get($collection);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.