BlockEntityOffCanvasForm::title

public BlockEntityOffCanvasForm::title(BlockInterface $block)

Provides a title callback to get the block's admin label.

Parameters

\Drupal\block\BlockInterface $block: The block entity.

Return value

\Drupal\Core\StringTranslation\TranslatableMarkup The title.

File

core/modules/outside_in/src/Block/BlockEntityOffCanvasForm.php, line 28

Class

BlockEntityOffCanvasForm
Provides form for block instance forms when used in the off-canvas tray.

Namespace

Drupal\outside_in\Block

Code

1
2
3
4
5
public function title(BlockInterface $block) {
  // @todo Wrap "Configure " in <span class="visually-hidden"></span> once
  return $this->t('Configure @block', ['@block' => $block->getPlugin()->getPluginDefinition()['admin_label']]);
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.