You are here

public function Library::getLayoutBuilderUrl in Layout builder library 8

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

File

src/Plugin/SectionStorage/Library.php, line 162

Class

Library
Defines a class for library based layout storage.

Namespace

Drupal\layout_library\Plugin\SectionStorage

Code

public function getLayoutBuilderUrl($rel = 'view') {
  return Url::fromRoute("layout_builder.{$this->getStorageType()}.{$this->getLayout()->getTargetEntityType()}.{$rel}", $this
    ->getRouteParameters());
}