function MoveBlockForm::title

Same name in other branches
  1. 8.9.x core/modules/layout_builder/src/Form/MoveBlockForm.php \Drupal\layout_builder\Form\MoveBlockForm::title()
  2. 10 core/modules/layout_builder/src/Form/MoveBlockForm.php \Drupal\layout_builder\Form\MoveBlockForm::title()
  3. 11.x 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 333

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,
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.