You are here

public function BlockEntitySettingTrayForm::title in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php \Drupal\settings_tray\Block\BlockEntitySettingTrayForm::title()

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.

1 string reference to 'BlockEntitySettingTrayForm::title'
settings_tray.routing.yml in core/modules/settings_tray/settings_tray.routing.yml
core/modules/settings_tray/settings_tray.routing.yml

File

core/modules/settings_tray/src/Block/BlockEntitySettingTrayForm.php, line 37

Class

BlockEntitySettingTrayForm
Provides form for block instance forms when used in the off-canvas dialog.

Namespace

Drupal\settings_tray\Block

Code

public function title(BlockInterface $block) {

  // @todo Wrap "Configure " in <span class="visually-hidden"></span> once
  //   https://www.drupal.org/node/2359901 is fixed.
  return $this
    ->t('Configure @block', [
    '@block' => $block
      ->getPlugin()
      ->getPluginDefinition()['admin_label'],
  ]);
}