You are here

public function CustomErrorController::titleCallback in Customerror 8

Title callback.

Parameters

int $code: The code of error.

Return value

string The title to page.

1 string reference to 'CustomErrorController::titleCallback'
customerror.routing.yml in ./customerror.routing.yml
customerror.routing.yml

File

src/Controller/CustomErrorController.php, line 122

Class

CustomErrorController
Controller for errors pages.

Namespace

Drupal\customerror\Controller

Code

public function titleCallback($code) {
  return \Drupal::config('customerror.settings')
    ->get("{$code}.title");
}