public function FacRoutes::routes in Fast Autocomplete 8
Returns an array of route objects.
Return value
\Symfony\Component\Routing\Route[] An array of route objects.
1 string reference to 'FacRoutes::routes'
File
- src/
Routing/ FacRoutes.php, line 19
Class
- FacRoutes
- Defines a route subscriber to register a url for service fac json files.
Namespace
Drupal\fac\RoutingCode
public function routes() {
$routes['fac.json'] = new Route(PublicStream::basePath() . '/fac-json/{fac_config_id}/{langcode}/{hash}/{key}', [
'_controller' => '\\Drupal\\fac\\Controller\\FacController::generateJson',
], [
'_permission' => 'access content',
'fac_config_id' => '.*?',
'langcode' => '^[a-z]{2,3}(?:-[A-Z]{2,3}(?:-[a-zA-Z]{4})?)?$',
'hash' => '.*?',
'key' => '.*?\\.json$',
]);
return $routes;
}