You are here

public function ContentHelpController::videoTitle in Content Synchronization 8

Same name and namespace in other branches
  1. 8.2 src/Controller/ContentHelpController.php \Drupal\content_sync\Controller\ContentHelpController::videoTitle()
  2. 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\Controller

Code

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