function LayoutTempstoreRepository::getTempstore

Same name in other branches
  1. 8.9.x core/modules/layout_builder/src/LayoutTempstoreRepository.php \Drupal\layout_builder\LayoutTempstoreRepository::getTempstore()
  2. 10 core/modules/layout_builder/src/LayoutTempstoreRepository.php \Drupal\layout_builder\LayoutTempstoreRepository::getTempstore()
  3. 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_builder

Code

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.