class EmptyPages in Empty Page 8
Defines a route subscriber to register a url from empty pages.
Hierarchy
- class \Drupal\empty_page\Routing\EmptyPages
Expanded class hierarchy of EmptyPages
File
- src/
Routing/ EmptyPages.php, line 11
Namespace
Drupal\empty_page\RoutingView source
class EmptyPages {
/**
* {@inheritdoc}
*/
public function routes() {
$routes = [];
$callbacks = EmptyPageController::emptyPageGetCallbacks();
if (!empty($callbacks)) {
foreach ($callbacks as $cid => $callback) {
$routes['empty_page.page_' . $cid] = new Route($callback['path'], [
'_controller' => '\\Drupal\\empty_page\\Controller\\EmptyPage::emptyCallback',
'_title' => $callback['page_title'],
], [
'_permission' => 'view empty pages',
]);
}
}
return $routes;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EmptyPages:: |
public | function |