function SectionStorageManager::load
Same name in other branches
- 9 core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php \Drupal\layout_builder\SectionStorage\SectionStorageManager::load()
- 10 core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php \Drupal\layout_builder\SectionStorage\SectionStorageManager::load()
- 11.x core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php \Drupal\layout_builder\SectionStorage\SectionStorageManager::load()
Overrides SectionStorageManagerInterface::load
3 calls to SectionStorageManager::load()
- SectionStorageManager::findByContext in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageManager.php - Finds the section storage to load based on available contexts.
- SectionStorageManager::loadFromRoute in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageManager.php - Loads a section storage populated with a section list derived from a route.
- SectionStorageManager::loadFromStorageId in core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageManager.php - Loads a section storage populated with an existing section list.
File
-
core/
modules/ layout_builder/ src/ SectionStorage/ SectionStorageManager.php, line 77
Class
- SectionStorageManager
- Provides the Section Storage type plugin manager.
Namespace
Drupal\layout_builder\SectionStorageCode
public function load($type, array $contexts = []) {
$plugin = $this->loadEmpty($type);
try {
$this->contextHandler
->applyContextMapping($plugin, $contexts);
} catch (ContextException $e) {
return NULL;
}
return $plugin;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.