public function PhotosUserImagesController::title in Album Photos 8.4
Photos page title.
1 string reference to 'PhotosUserImagesController::title'
File
- src/
Controller/ PhotosUserImagesController.php, line 141
Class
- PhotosUserImagesController
- Content controller for user images.
Namespace
Drupal\photos\ControllerCode
public function title() {
// Generate title.
$user = $this
->currentUser();
$uid = $this->routeMatch
->getParameter('user');
if ($uid != $user
->id()) {
$account = $this->entityTypeManager
->getStorage('user')
->load($uid);
return $this
->t("@name's images", [
'@name' => $account
->getDisplayName(),
]);
}
else {
return $this
->t('My Images');
}
}