public function SmartDateFormatHtmlRouteProvider::getRoutes in Smart Date 3.0.x
Same name and namespace in other branches
- 8.2 src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getRoutes()
- 8 src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getRoutes()
- 3.x src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getRoutes()
- 3.1.x src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getRoutes()
- 3.2.x src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getRoutes()
- 3.3.x src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getRoutes()
- 3.4.x src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getRoutes()
Provides routes for entities.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type
Return value
\Symfony\Component\Routing\RouteCollection|\Symfony\Component\Routing\Route[] Returns a route collection or an array of routes keyed by name, like route_callbacks inside 'routing.yml' files.
Overrides DefaultHtmlRouteProvider::getRoutes
File
- src/
Entity/ SmartDateFormatHtmlRouteProvider.php, line 20
Class
- SmartDateFormatHtmlRouteProvider
- Provides routes for Smart date formats.
Namespace
Drupal\smart_date\EntityCode
public function getRoutes(EntityTypeInterface $entity_type) {
$collection = parent::getRoutes($entity_type);
$entity_type_id = $entity_type
->id();
if ($settings_form_route = $this
->getSettingsFormRoute($entity_type)) {
$collection
->add("{$entity_type_id}.settings", $settings_form_route);
}
return $collection;
}