protected function SmartDateFormatHtmlRouteProvider::getSettingsFormRoute in Smart Date 8
Same name and namespace in other branches
- 8.2 src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getSettingsFormRoute()
- 3.x src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getSettingsFormRoute()
- 3.0.x src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getSettingsFormRoute()
- 3.1.x src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getSettingsFormRoute()
- 3.2.x src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getSettingsFormRoute()
- 3.3.x src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getSettingsFormRoute()
- 3.4.x src/Entity/SmartDateFormatHtmlRouteProvider.php \Drupal\smart_date\Entity\SmartDateFormatHtmlRouteProvider::getSettingsFormRoute()
Gets the settings form route.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
Return value
\Symfony\Component\Routing\Route|null The generated route, if available.
1 call to SmartDateFormatHtmlRouteProvider::getSettingsFormRoute()
- SmartDateFormatHtmlRouteProvider::getRoutes in src/
Entity/ SmartDateFormatHtmlRouteProvider.php - Provides routes for entities.
File
- src/
Entity/ SmartDateFormatHtmlRouteProvider.php, line 41
Class
- SmartDateFormatHtmlRouteProvider
- Provides routes for Smart date formats.
Namespace
Drupal\smart_date\EntityCode
protected function getSettingsFormRoute(EntityTypeInterface $entity_type) {
if (!$entity_type
->getBundleEntityType()) {
$route = new Route("/admin/config/regional/smart_date_format/settings");
$route
->setDefaults([
'_form' => 'Drupal\\smart_date\\Form\\SmartDateFormatSettingsForm',
'_title' => "{$entity_type->getLabel()} settings",
])
->setRequirement('_permission', $entity_type
->getAdminPermission())
->setOption('_admin_route', TRUE);
return $route;
}
}