alterInfo('layout_builder_section_storage'); $this->setCacheBackend($cache_backend, 'layout_builder_section_storage_plugins'); } /** * {@inheritdoc} */ public function loadEmpty($id) { return $this->createInstance($id); } /** * {@inheritdoc} */ public function loadFromStorageId($type, $id) { /** @var \Drupal\layout_builder\SectionStorageInterface $plugin */ $plugin = $this->createInstance($type); return $plugin->setSectionList($plugin->getSectionListFromId($id)); } /** * {@inheritdoc} */ public function loadFromRoute($type, $value, $definition, $name, array $defaults) { /** @var \Drupal\layout_builder\SectionStorageInterface $plugin */ $plugin = $this->createInstance($type); if ($id = $plugin->extractIdFromRoute($value, $definition, $name, $defaults)) { try { return $plugin->setSectionList($plugin->getSectionListFromId($id)); } catch (\InvalidArgumentException $e) { // Intentionally empty. } } } }