Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. LayoutBuilderController.php

function LayoutBuilderController::title

Provides a title callback.

Parameters

\Drupal\layout_builder\SectionStorageInterface $section_storage: The section storage.

Return value

string The title for the layout page.

File

core/modules/layout_builder/src/Controller/LayoutBuilderController.php, line 28

Class

LayoutBuilderController
Defines a controller to provide the Layout Builder admin UI.

Namespace

Drupal\layout_builder\Controller

Code

public function title(SectionStorageInterface $section_storage) {
    assert(Inspector::assertStringable($section_storage->label()), 'Section storage label is expected to be a string.');
    return $this->t('Edit layout for %label', [
        '%label' => $section_storage->label() ?? $section_storage->getStorageType() . ' ' . $section_storage->getStorageId(),
    ]);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal