protected function LayoutTempstoreRepository::getTempstore in Drupal 8
Same name and namespace in other branches
- 9 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);
}