public function PhotosImageViewController::title in Album Photos 8.5
Same name and namespace in other branches
- 6.0.x src/Controller/PhotosImageViewController.php \Drupal\photos\Controller\PhotosImageViewController::title()
The _title_callback for the page that renders a single photos image.
Parameters
\Drupal\Core\Entity\EntityInterface $photos_image: The current photos_image.
Return value
string The page title.
File
- src/
Controller/ PhotosImageViewController.php, line 270
Class
- PhotosImageViewController
- Image view controller.
Namespace
Drupal\photos\ControllerCode
public function title(EntityInterface $photos_image) {
$title = '';
if ($this->entityRepository) {
$title = $this->entityRepository
->getTranslationFromContext($photos_image)
->label();
}
return $title;
}