public function PhotosUserAlbumsController::title in Album Photos 8.4
Photos page title.
1 string reference to 'PhotosUserAlbumsController::title'
File
- src/
Controller/ PhotosUserAlbumsController.php, line 102
Class
- PhotosUserAlbumsController
- Display user albums.
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 albums", [
'@name' => $account
->getDisplayName(),
]);
}
else {
return $this
->t('My Albums');
}
}