You are here

public function GroupContentController::editFormTitle in Group 2.0.x

Same name and namespace in other branches
  1. 8 src/Entity/Controller/GroupContentController.php \Drupal\group\Entity\Controller\GroupContentController::editFormTitle()

The _title_callback for the entity.group_content.edit_form route.

Overrides the Drupal\Core\Entity\Controller\EntityController::editTitle().

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 edit page, if an entity was found.

File

src/Entity/Controller/GroupContentController.php, line 269

Class

GroupContentController
Returns responses for GroupContent routes.

Namespace

Drupal\group\Entity\Controller

Code

public function editFormTitle(RouteMatchInterface $route_match, EntityInterface $_entity = NULL) {
  if ($entity = $route_match
    ->getParameter('group_content')) {
    return $this
      ->t('Edit %label', [
      '%label' => $entity
        ->label(),
    ]);
  }
}