layoutTempstoreRepository = $layout_tempstore_repository; $this->sectionStorageManager = $section_storage_manager; } /** * {@inheritdoc} */ public function convert($value, $definition, $name, array $defaults) { if (isset($defaults['section_storage_type']) && $this->sectionStorageManager->hasDefinition($defaults['section_storage_type'])) { if ($section_storage = $this->sectionStorageManager->loadFromRoute($defaults['section_storage_type'], $value, $definition, $name, $defaults)) { // Pass the plugin through the tempstore repository. return $this->layoutTempstoreRepository->get($section_storage); } } } /** * {@inheritdoc} */ public function applies($definition, $name, Route $route) { return !empty($definition['layout_builder_tempstore']); } }