function BlockContentController::getAddFormTitle
Same name and namespace in other branches
- 11.x core/modules/block_content/src/Controller/BlockContentController.php \Drupal\block_content\Controller\BlockContentController::getAddFormTitle()
- 10 core/modules/block_content/src/Controller/BlockContentController.php \Drupal\block_content\Controller\BlockContentController::getAddFormTitle()
- 9 core/modules/block_content/src/Controller/BlockContentController.php \Drupal\block_content\Controller\BlockContentController::getAddFormTitle()
- 8.9.x core/modules/block_content/src/Controller/BlockContentController.php \Drupal\block_content\Controller\BlockContentController::getAddFormTitle()
Provides the page title for this controller.
Parameters
\Drupal\block_content\BlockContentTypeInterface $block_content_type: The block type being added.
Return value
string The page title.
Deprecated
in drupal:11.5.0 and is removed from drupal:13.0.0. Use the title closure on the route attribute instead.
See also
https://www.drupal.org/node/3614321
File
-
core/
modules/ block_content/ src/ Controller/ BlockContentController.php, line 116
Class
- BlockContentController
- Controller routines for custom block routes.
Namespace
Drupal\block_content\ControllerCode
public function getAddFormTitle(BlockContentTypeInterface $block_content_type) {
@trigger_error('The ' . __METHOD__ . ' method is deprecated in drupal:11.5.0 and is removed from drupal:13.0.0. Use the title closure on the route attribute instead. See https://www.drupal.org/node/3614321', E_USER_DEPRECATED);
return $this->t('Add %type content block', [
'%type' => $block_content_type->label(),
]);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.