function SectionStorageManager::load

Same name in other branches
  1. 9 core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php \Drupal\layout_builder\SectionStorage\SectionStorageManager::load()
  2. 8.9.x core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php \Drupal\layout_builder\SectionStorage\SectionStorageManager::load()
  3. 11.x core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php \Drupal\layout_builder\SectionStorage\SectionStorageManager::load()
1 call to SectionStorageManager::load()
SectionStorageManager::findByContext in core/modules/layout_builder/src/SectionStorage/SectionStorageManager.php

File

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

Class

SectionStorageManager
Provides the Section Storage type plugin manager.

Namespace

Drupal\layout_builder\SectionStorage

Code

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.