You are here

public function TeamTitleProvider::teamMembersList in Apigee Edge 8

Provides a title for the team members listing page.

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 team members listing page, null if an entity was found.

File

modules/apigee_edge_teams/src/Entity/TeamTitleProvider.php, line 43

Class

TeamTitleProvider
Team specific title additions and overrides.

Namespace

Drupal\apigee_edge_teams\Entity

Code

public function teamMembersList(RouteMatchInterface $route_match, EntityInterface $_entity = NULL) {
  if ($entity = $this
    ->doGetEntity($route_match, $_entity)) {
    return $this
      ->t('@entity_type Members', [
      '@entity_type' => ucfirst($this->entityTypeManager
        ->getDefinition($entity
        ->getEntityTypeId())
        ->getSingularLabel()),
    ]);
  }
}