You are here

public function MoveBlockForm::title in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Form/MoveBlockForm.php \Drupal\layout_builder\Form\MoveBlockForm::title()

Provides a title callback.

Parameters

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

int $delta: The original delta of the section.

string $uuid: The UUID of the block being updated.

Return value

string The title for the move block form.

1 string reference to 'MoveBlockForm::title'
layout_builder.routing.yml in core/modules/layout_builder/layout_builder.routing.yml
core/modules/layout_builder/layout_builder.routing.yml

File

core/modules/layout_builder/src/Form/MoveBlockForm.php, line 331

Class

MoveBlockForm
Provides a form for moving a block.

Namespace

Drupal\layout_builder\Form

Code

public function title(SectionStorageInterface $section_storage, $delta, $uuid) {
  $block_label = $section_storage
    ->getSection($delta)
    ->getComponent($uuid)
    ->getPlugin()
    ->label();
  return $this
    ->t('Move the @block_label block', [
    '@block_label' => $block_label,
  ]);
}