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

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']]);
}
doc_Drupal
2016-10-29 08:47:28
Comments
Leave a Comment

Please login to continue.