You are here

public function PhotosAlbumController::getTitle in Album Photos 8.4

Same name and namespace in other branches
  1. 8.5 src/Controller/PhotosAlbumController.php \Drupal\photos\Controller\PhotosAlbumController::getTitle()
  2. 6.0.x src/Controller/PhotosAlbumController.php \Drupal\photos\Controller\PhotosAlbumController::getTitle()

Set page title.

1 string reference to 'PhotosAlbumController::getTitle'
photos.routing.yml in ./photos.routing.yml
photos.routing.yml

File

src/Controller/PhotosAlbumController.php, line 111

Class

PhotosAlbumController
Album view controller.

Namespace

Drupal\photos\Controller

Code

public function getTitle() {

  // Get node object.
  $node = $this->routeMatch
    ->getParameter('node');
  return $this
    ->t('Album: @node_title', [
    '@node_title' => $node
      ->getTitle(),
  ]);
}