public function YamlFormHelpController::title in YAML Form 8
Route title callback.
Parameters
string $id: The id of the dedicated help section.
Return value
string The dedicated help section's title.
1 string reference to 'YamlFormHelpController::title'
File
- src/
Controller/ YamlFormHelpController.php, line 88
Class
- YamlFormHelpController
- Provides route responses for form help.
Namespace
Drupal\yamlform\ControllerCode
public function title(Request $request, $id) {
$id = str_replace('-', '_', $id);
$video = $this->helpManager
->getVideo($id);
return isset($video) ? $video['title'] : $this
->t('Watch video');
}