protected function getAddPageRoute(EntityTypeInterface $entity_type) {
    $route = new Route("/admin/openy/settings/mappings/{$entity_type->id()}/add");
    $route
      ->setDefaults([
        '_controller' => 'Drupal\openy_mappings\Controller\MappingAddController::add',
        '_title' => "Add {$entity_type->getLabel()}",
      ])
      ->setRequirement('_entity_create_access', $entity_type->id())
      ->setOption('_admin_route', TRUE);

    return $route;
  }
protected function getAddPageRoute(EntityTypeInterface $entity_type) {
    $route = new Route("/admin/openy/settings/mappings/{$entity_type->id()}/add");
    $route
      ->setDefaults([
        '_controller' => 'Drupal\openy_mappings\Controller\MappingAddController::add',
        '_title' => "Add {$entity_type->getLabel()}",
      ])
      ->setRequirement('_entity_create_access', $entity_type->id())
      ->setOption('_admin_route', TRUE);

    return $route;
  }
protected function getAddPageRoute ( EntityTypeInterface $ entity_type ) { $ route = new Route ( "/admin/openy/settings/mappings/{$entity_type->id()}/add" ) ; $ route -> setDefaults ( [ '_controller' => 'Drupal\openy_mappings\Controller\MappingAddController::add' , '_title' => "Add {$entity_type->getLabel()}" , ] ) -> setRequirement ( '_entity_create_access' , $ entity_type -> id ( ) ) -> setOption ( '_admin_route' , TRUE ) ; return $ route ; }
Gets the add page route.

@param \Drupal\Core\Entity\EntityTypeInterface $entity_type
The entity type.

@return \Symfony\Component\Routing\Route|null
The generated route, if available.
Gets the add page route .