You are here

public function ProfileViewController::title in Profile 2 8

The _title_callback for the page that renders a profile entity.

Parameters

\Drupal\Core\Entity\EntityInterface $profile: The current profile.

Return value

string The page title.

1 string reference to 'ProfileViewController::title'
profile.routing.yml in ./profile.routing.yml
profile.routing.yml

File

src/Controller/ProfileViewController.php, line 64
Contains \Drupal\profile\Controller\ProfileViewController.

Class

ProfileViewController
Defines a controller to render a single profile entity.

Namespace

Drupal\profile\Controller

Code

public function title(EntityInterface $profile) {
  return String::checkPlain($this->entityManager
    ->getTranslationFromContext($profile)
    ->label());
}