protected function ApiDocHtmlRouteProvider::getSettingsFormRoute in Apigee API Catalog 8
Same name and namespace in other branches
- 8.2 src/Entity/Routing/ApiDocHtmlRouteProvider.php \Drupal\apigee_api_catalog\Entity\Routing\ApiDocHtmlRouteProvider::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 ApiDocHtmlRouteProvider::getSettingsFormRoute()
- ApiDocHtmlRouteProvider::getRoutes in src/
Entity/ Routing/ ApiDocHtmlRouteProvider.php - Provides routes for entities.
File
- src/
Entity/ Routing/ ApiDocHtmlRouteProvider.php, line 69
Class
- ApiDocHtmlRouteProvider
- Provides routes for API Doc entities.
Namespace
Drupal\apigee_api_catalog\Entity\RoutingCode
protected function getSettingsFormRoute(EntityTypeInterface $entity_type) {
if (!$entity_type
->getBundleEntityType()) {
$route = new Route('admin/structure/apidoc');
$route
->setDefaults([
'_form' => 'Drupal\\apigee_api_catalog\\Entity\\Form\\ApiDocSettingsForm',
'_title_callback' => ApiDocController::class . '::title',
])
->setRequirement('_permission', $entity_type
->getAdminPermission())
->setOption('_admin_route', TRUE);
return $route;
}
}