class FacRoutes in Fast Autocomplete 8
Defines a route subscriber to register a url for service fac json files.
Hierarchy
- class \Drupal\fac\Routing\FacRoutes
Expanded class hierarchy of FacRoutes
File
- src/
Routing/ FacRoutes.php, line 11
Namespace
Drupal\fac\RoutingView source
class FacRoutes {
/**
* Returns an array of route objects.
*
* @return \Symfony\Component\Routing\Route[]
* An array of route objects.
*/
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
FacRoutes:: |
public | function | Returns an array of route objects. |