You are here

public function SectionStorageManager::loadEmpty in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php \Drupal\layout_builder\SectionStorage\SectionStorageManager::loadEmpty()

Loads a section storage with no associated section list.

@internal Section storage relies on context to load section lists. Use ::load() when that context is available. This method is intended for use by collaborators of the plugins in build-time situations when section storage type must be consulted.

Parameters

string $type: The type of the section storage being instantiated.

Return value

\Drupal\layout_builder\SectionStorageInterface The section storage.

Overrides SectionStorageManagerInterface::loadEmpty

1 call to SectionStorageManager::loadEmpty()
SectionStorageManager::load in core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php
Loads a section storage with the provided contexts applied.

File

core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php, line 110

Class

SectionStorageManager
Provides the Section Storage type plugin manager.

Namespace

Drupal\layout_builder\SectionStorage

Code

public function loadEmpty($type) {
  return $this
    ->createInstance($type);
}