public function WebformTestController::title in Webform 8.5
Same name and namespace in other branches
- 6.x src/Controller/WebformTestController.php \Drupal\webform\Controller\WebformTestController::title()
Route title callback.
Parameters
\Drupal\webform\WebformInterface $webform: The webform.
Return value
string The webform label as a render array.
2 string references to 'WebformTestController::title'
- webform.routing.yml in ./
webform.routing.yml - webform.routing.yml
- webform_devel.routing.yml in modules/
webform_devel/ webform_devel.routing.yml - modules/webform_devel/webform_devel.routing.yml
File
- src/
Controller/ WebformTestController.php, line 161
Class
- WebformTestController
- Provides route responses for Webform testing.
Namespace
Drupal\webform\ControllerCode
public function title(WebformInterface $webform) {
/** @var \Drupal\webform\WebformInterface $webform */
/** @var \Drupal\Core\Entity\EntityInterface $source_entity */
list($webform, $source_entity) = $this->requestHandler
->getWebformEntities();
return $this
->t('Testing %title webform', [
'%title' => $source_entity ? $source_entity
->label() : $webform
->label(),
]);
}