Loading core/modules/layout_builder/layout_builder.info.yml +0 −2 Original line number Diff line number Diff line Loading @@ -6,7 +6,5 @@ version: VERSION dependencies: - drupal:layout_discovery - drupal:contextual # @todo Discuss removing in https://www.drupal.org/project/drupal/issues/2935999. - drupal:field_ui # @todo Discuss removing in https://www.drupal.org/project/drupal/issues/3003610. - drupal:block core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php +9 −4 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ use Drupal\Core\Plugin\Context\EntityContext; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Url; use Drupal\field_ui\FieldUI; use Drupal\layout_builder\DefaultsSectionStorageInterface; use Drupal\layout_builder\Entity\SampleEntityGeneratorInterface; use Symfony\Component\DependencyInjection\ContainerInterface; Loading Loading @@ -136,15 +135,21 @@ public function getLayoutBuilderUrl($rel = 'view') { protected function getRouteParameters() { $display = $this->getDisplay(); $entity_type = $this->entityTypeManager->getDefinition($display->getTargetEntityTypeId()); $route_parameters = FieldUI::getRouteBundleParameter($entity_type, $display->getTargetBundle()); $route_parameters['view_mode_name'] = $display->getMode(); return $route_parameters; $bundle_parameter_key = $entity_type->getBundleEntityType() ?: 'bundle'; return [ $bundle_parameter_key => $display->getTargetBundle(), 'view_mode_name' => $display->getMode(), ]; } /** * {@inheritdoc} */ public function buildRoutes(RouteCollection $collection) { if (!\Drupal::moduleHandler()->moduleExists('field_ui')) { return; } foreach ($this->getEntityTypes() as $entity_type_id => $entity_type) { // Try to get the route from the current collection. if (!$entity_route = $collection->get($entity_type->get('field_ui_base_route'))) { Loading core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ class LayoutBuilderAccessTest extends BrowserTestBase { protected static $modules = [ 'layout_builder', 'block_test', 'field_ui', 'node', 'user', ]; Loading core/modules/layout_builder/tests/src/Functional/LayoutBuilderPrepareLayoutTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ class LayoutBuilderPrepareLayoutTest extends BrowserTestBase { * {@inheritdoc} */ protected static $modules = [ 'field_ui', 'layout_builder', 'node', 'layout_builder_element_test', Loading core/modules/layout_builder/tests/src/Functional/LayoutBuilderSectionStorageTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ class LayoutBuilderSectionStorageTest extends BrowserTestBase { */ protected static $modules = [ 'layout_builder', 'field_ui', 'node', 'layout_builder_test', ]; Loading Loading
core/modules/layout_builder/layout_builder.info.yml +0 −2 Original line number Diff line number Diff line Loading @@ -6,7 +6,5 @@ version: VERSION dependencies: - drupal:layout_discovery - drupal:contextual # @todo Discuss removing in https://www.drupal.org/project/drupal/issues/2935999. - drupal:field_ui # @todo Discuss removing in https://www.drupal.org/project/drupal/issues/3003610. - drupal:block
core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php +9 −4 Original line number Diff line number Diff line Loading @@ -14,7 +14,6 @@ use Drupal\Core\Plugin\Context\EntityContext; use Drupal\Core\Session\AccountInterface; use Drupal\Core\Url; use Drupal\field_ui\FieldUI; use Drupal\layout_builder\DefaultsSectionStorageInterface; use Drupal\layout_builder\Entity\SampleEntityGeneratorInterface; use Symfony\Component\DependencyInjection\ContainerInterface; Loading Loading @@ -136,15 +135,21 @@ public function getLayoutBuilderUrl($rel = 'view') { protected function getRouteParameters() { $display = $this->getDisplay(); $entity_type = $this->entityTypeManager->getDefinition($display->getTargetEntityTypeId()); $route_parameters = FieldUI::getRouteBundleParameter($entity_type, $display->getTargetBundle()); $route_parameters['view_mode_name'] = $display->getMode(); return $route_parameters; $bundle_parameter_key = $entity_type->getBundleEntityType() ?: 'bundle'; return [ $bundle_parameter_key => $display->getTargetBundle(), 'view_mode_name' => $display->getMode(), ]; } /** * {@inheritdoc} */ public function buildRoutes(RouteCollection $collection) { if (!\Drupal::moduleHandler()->moduleExists('field_ui')) { return; } foreach ($this->getEntityTypes() as $entity_type_id => $entity_type) { // Try to get the route from the current collection. if (!$entity_route = $collection->get($entity_type->get('field_ui_base_route'))) { Loading
core/modules/layout_builder/tests/src/Functional/LayoutBuilderAccessTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ class LayoutBuilderAccessTest extends BrowserTestBase { protected static $modules = [ 'layout_builder', 'block_test', 'field_ui', 'node', 'user', ]; Loading
core/modules/layout_builder/tests/src/Functional/LayoutBuilderPrepareLayoutTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ class LayoutBuilderPrepareLayoutTest extends BrowserTestBase { * {@inheritdoc} */ protected static $modules = [ 'field_ui', 'layout_builder', 'node', 'layout_builder_element_test', Loading
core/modules/layout_builder/tests/src/Functional/LayoutBuilderSectionStorageTest.php +1 −0 Original line number Diff line number Diff line Loading @@ -16,6 +16,7 @@ class LayoutBuilderSectionStorageTest extends BrowserTestBase { */ protected static $modules = [ 'layout_builder', 'field_ui', 'node', 'layout_builder_test', ]; Loading