protected function DeveloperAppRouteProvider::getAddFormRoute in Apigee Edge 8
Gets the add-form route.
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type: The entity type.
Return value
\Symfony\Component\Routing\Route|null The generated route, if available.
Overrides DefaultHtmlRouteProvider::getAddFormRoute
File
- src/
Entity/ DeveloperAppRouteProvider.php, line 92
Class
- DeveloperAppRouteProvider
- Default entity routes for developer apps.
Namespace
Drupal\apigee_edge\EntityCode
protected function getAddFormRoute(EntityTypeInterface $entity_type) {
$route = parent::getAddFormRoute($entity_type);
if ($route) {
// We did not want to expose this UI to regular users this the reason
// why route is only available to admins for now.
$route
->setRequirement('_permission', 'administer developer_app');
}
return $route;
}