interface LayoutTempstoreRepositoryInterface (View source)

Provides an interface for loading layouts from tempstore.

Methods

get(SectionStorageInterface $section_storage)

Gets the tempstore version of a section storage, if it exists.

set(SectionStorageInterface $section_storage)

Stores this section storage in tempstore.

bool
has(SectionStorageInterface $section_storage)

Checks for the existence of a tempstore version of a section storage.

delete(SectionStorageInterface $section_storage)

Removes the tempstore version of a section storage.

Details

SectionStorageInterface get(SectionStorageInterface $section_storage)

Gets the tempstore version of a section storage, if it exists.

Parameters

SectionStorageInterface $section_storage

The section storage to check for in tempstore.

Return Value

SectionStorageInterface

Either the version of this section storage from tempstore, or the passed section storage if none exists.

Exceptions

UnexpectedValueException

set(SectionStorageInterface $section_storage)

Stores this section storage in tempstore.

Parameters

SectionStorageInterface $section_storage

The section storage to set in tempstore.

bool has(SectionStorageInterface $section_storage)

Checks for the existence of a tempstore version of a section storage.

Parameters

SectionStorageInterface $section_storage

The section storage to check for in tempstore.

Return Value

bool

TRUE if there is a tempstore version of this section storage.

delete(SectionStorageInterface $section_storage)

Removes the tempstore version of a section storage.

Parameters

SectionStorageInterface $section_storage

The section storage to remove from tempstore.