You are here

public function SimpleConfigSectionStorage::getLayoutBuilderUrl in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php \Drupal\layout_builder_test\Plugin\SectionStorage\SimpleConfigSectionStorage::getLayoutBuilderUrl()
  2. 10 core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php \Drupal\layout_builder_test\Plugin\SectionStorage\SimpleConfigSectionStorage::getLayoutBuilderUrl()

Gets the URL used to display the Layout Builder UI.

Parameters

string $rel: (optional) The link relationship type, for example: 'view' or 'disable'. Defaults to 'view'.

Return value

\Drupal\Core\Url The URL object.

Overrides SectionStorageInterface::getLayoutBuilderUrl

1 call to SimpleConfigSectionStorage::getLayoutBuilderUrl()
SimpleConfigSectionStorage::getRedirectUrl in core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php
Gets the URL used when redirecting away from the Layout Builder UI.

File

core/modules/layout_builder/tests/modules/layout_builder_test/src/Plugin/SectionStorage/SimpleConfigSectionStorage.php, line 175

Class

SimpleConfigSectionStorage
Provides section storage utilizing simple config.

Namespace

Drupal\layout_builder_test\Plugin\SectionStorage

Code

public function getLayoutBuilderUrl($rel = 'view') {
  return Url::fromRoute("layout_builder.{$this->getStorageType()}.{$rel}", [
    'id' => $this
      ->getStorageId(),
  ]);
}