interface LayoutTempstoreRepositoryInterface

Same name in other branches
  1. 9 core/modules/layout_builder/src/LayoutTempstoreRepositoryInterface.php \Drupal\layout_builder\LayoutTempstoreRepositoryInterface
  2. 8.9.x core/modules/layout_builder/src/LayoutTempstoreRepositoryInterface.php \Drupal\layout_builder\LayoutTempstoreRepositoryInterface
  3. 10 core/modules/layout_builder/src/LayoutTempstoreRepositoryInterface.php \Drupal\layout_builder\LayoutTempstoreRepositoryInterface

Provides an interface for loading layouts from tempstore.

Hierarchy

Expanded class hierarchy of LayoutTempstoreRepositoryInterface

All classes that implement LayoutTempstoreRepositoryInterface

16 files declare their use of LayoutTempstoreRepositoryInterface
AddSectionController.php in core/modules/layout_builder/src/Controller/AddSectionController.php
ConfigureBlockFormBase.php in core/modules/layout_builder/src/Form/ConfigureBlockFormBase.php
ConfigureSectionForm.php in core/modules/layout_builder/src/Form/ConfigureSectionForm.php
DefaultsEntityForm.php in core/modules/layout_builder/src/Form/DefaultsEntityForm.php
DiscardLayoutChangesForm.php in core/modules/layout_builder/src/Form/DiscardLayoutChangesForm.php

... See full list

File

core/modules/layout_builder/src/LayoutTempstoreRepositoryInterface.php, line 8

Namespace

Drupal\layout_builder
View source
interface LayoutTempstoreRepositoryInterface {
    
    /**
     * Gets the tempstore version of a section storage, if it exists.
     *
     * @param \Drupal\layout_builder\SectionStorageInterface $section_storage
     *   The section storage to check for in tempstore.
     *
     * @return \Drupal\layout_builder\SectionStorageInterface
     *   Either the version of this section storage from tempstore, or the passed
     *   section storage if none exists.
     *
     * @throw \UnexpectedValueException
     *   Thrown if a value exists, but is not a section storage.
     */
    public function get(SectionStorageInterface $section_storage);
    
    /**
     * Stores this section storage in tempstore.
     *
     * @param \Drupal\layout_builder\SectionStorageInterface $section_storage
     *   The section storage to set in tempstore.
     */
    public function set(SectionStorageInterface $section_storage);
    
    /**
     * Checks for the existence of a tempstore version of a section storage.
     *
     * @param \Drupal\layout_builder\SectionStorageInterface $section_storage
     *   The section storage to check for in tempstore.
     *
     * @return bool
     *   TRUE if there is a tempstore version of this section storage.
     */
    public function has(SectionStorageInterface $section_storage);
    
    /**
     * Removes the tempstore version of a section storage.
     *
     * @param \Drupal\layout_builder\SectionStorageInterface $section_storage
     *   The section storage to remove from tempstore.
     */
    public function delete(SectionStorageInterface $section_storage);

}

Members

Title Sort descending Modifiers Object type Summary
LayoutTempstoreRepositoryInterface::delete public function Removes the tempstore version of a section storage.
LayoutTempstoreRepositoryInterface::get public function Gets the tempstore version of a section storage, if it exists.
LayoutTempstoreRepositoryInterface::has public function Checks for the existence of a tempstore version of a section storage.
LayoutTempstoreRepositoryInterface::set public function Stores this section storage in tempstore.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.