You are here

public function PhotosAlbumController::getTitle in Album Photos 8.5

Same name and namespace in other branches
  1. 8.4 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.

File

src/Controller/PhotosAlbumController.php, line 137

Class

PhotosAlbumController
Album view controller.

Namespace

Drupal\photos\Controller

Code

public function getTitle() {

  // Get node object.
  $node = $this->routeMatch
    ->getParameter('node');
  $title = 'Album: ' . $node
    ->getTitle();
  return $title;
}