You are here

public function UnitController::addPageTitle in Booking and Availability Management Tools for Drupal 8

The _title_callback for the unit.add route.

Parameters

\Drupal\bat_unit\UnitBundleInterface $unit_bundle: The current unit bundle.

Return value

string The page title.

1 string reference to 'UnitController::addPageTitle'
bat_unit.routing.yml in modules/bat_unit/bat_unit.routing.yml
modules/bat_unit/bat_unit.routing.yml

File

modules/bat_unit/src/Controller/UnitController.php, line 93
Contains \Drupal\bat_unit\Controller\UnitController.

Class

UnitController
Returns responses for Type routes.

Namespace

Drupal\bat_unit\Controller

Code

public function addPageTitle(UnitBundleInterface $unit_bundle) {
  return $this
    ->t('Create @name', [
    '@name' => $unit_bundle
      ->label(),
  ]);
}