You are here

public function BadgeController::addBadgeTitle in User Badges 8

The _title_callback for the user_badges.badge_controller_add route.

Parameters

\Drupal\user_badges\BadgeTypeInterface $badge_type: The current node.

Return value

string The page title.

1 string reference to 'BadgeController::addBadgeTitle'
user_badges.routing.yml in ./user_badges.routing.yml
user_badges.routing.yml

File

src/Controller/BadgeController.php, line 106
Contains \Drupal\user_badges\Controller\BadgeController.

Class

BadgeController
Class BadgeController.

Namespace

Drupal\user_badges\Controller

Code

public function addBadgeTitle(BadgeTypeInterface $badge_type) {
  return $this
    ->t('Create @name', [
    '@name' => $badge_type
      ->label(),
  ]);
}