You are here

public function ConfigPagesController::getAddFormTitle in Config Pages 8

Same name and namespace in other branches
  1. 8.3 src/Controller/ConfigPagesController.php \Drupal\config_pages\Controller\ConfigPagesController::getAddFormTitle()
  2. 8.2 src/Controller/ConfigPagesController.php \Drupal\config_pages\Controller\ConfigPagesController::getAddFormTitle()

Provides the page title for this controller.

Parameters

\Drupal\config_pages\ConfigPagesTypeInterface $config_pages_type: The config page type being added.

Return value

string The page title.

1 string reference to 'ConfigPagesController::getAddFormTitle'
config_pages.routing.yml in ./config_pages.routing.yml
config_pages.routing.yml

File

src/Controller/ConfigPagesController.php, line 103

Class

ConfigPagesController

Namespace

Drupal\config_pages\Controller

Code

public function getAddFormTitle($config_pages_type) {
  $config_pages_types = ConfigPagesType::loadMultiple();
  $config_pages_type = $config_pages_types[$config_pages_type];
  return $this
    ->t('Add %type config page', [
    '%type' => $config_pages_type
      ->label(),
  ]);
}