You are here

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'
yamlform.routing.yml in ./yamlform.routing.yml
yamlform.routing.yml

File

src/Controller/YamlFormHelpController.php, line 88

Class

YamlFormHelpController
Provides route responses for form help.

Namespace

Drupal\yamlform\Controller

Code

public function title(Request $request, $id) {
  $id = str_replace('-', '_', $id);
  $video = $this->helpManager
    ->getVideo($id);
  return isset($video) ? $video['title'] : $this
    ->t('Watch video');
}