public function ContentHelpController::videoTitle in Content Synchronization 8
Same name and namespace in other branches
- 8.2 src/Controller/ContentHelpController.php \Drupal\content_sync\Controller\ContentHelpController::videoTitle()
- 3.0.x src/Controller/ContentHelpController.php \Drupal\content_sync\Controller\ContentHelpController::videoTitle()
Route video title callback.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The current request.
string $id: The id of the dedicated help section.
Return value
string The help video's title.
File
- src/
Controller/ ContentHelpController.php, line 110
Class
- ContentHelpController
- Provides route responses for content_sync help.
Namespace
Drupal\content_sync\ControllerCode
public function videoTitle(Request $request, $id) {
$id = str_replace('-', '_', $id);
$video = $this->helpManager
->getVideo($id);
return isset($video) ? $video['title'] : $this
->t('Watch video');
}