You are here

public function TeamInvitationTitleProvider::acceptTitle in Apigee Edge 8

Provides the accept title for a team_invitation.

Parameters

\Drupal\Core\Routing\RouteMatchInterface $route_match: The route match.

\Drupal\Core\Entity\EntityInterface $_entity: (optional) An entity, passed in directly from the request attributes.

Return value

string|null The title for the entity accept page.

Overrides TeamInvitationTitleProviderInterface::acceptTitle

File

modules/apigee_edge_teams/src/Entity/TeamInvitationTitleProvider.php, line 35

Class

TeamInvitationTitleProvider
Title provider for team_invitation.

Namespace

Drupal\apigee_edge_teams\Entity

Code

public function acceptTitle(RouteMatchInterface $route_match, EntityInterface $_entity = NULL) {
  if ($entity = $this
    ->doGetEntity($route_match, $_entity)) {
    return $this
      ->t('Accept %label', [
      '%label' => $entity
        ->label(),
    ]);
  }
}