Skip to content

Commit

Permalink
Add fallback routes when 'index' is not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Feb 17, 2024
1 parent c62b58f commit 393f34f
Show file tree
Hide file tree
Showing 10 changed files with 8 additions and 219 deletions.
2 changes: 1 addition & 1 deletion app/src/Controller/Group/GroupPageAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Interfaces\RouteParserInterface;
use Slim\Views\Twig;
use UserFrosting\Sprinkle\Account\Authenticate\Authenticator;
use UserFrosting\Sprinkle\Account\Database\Models\Interfaces\GroupInterface;
use UserFrosting\Sprinkle\Account\Exceptions\ForbiddenException;
use UserFrosting\Sprinkle\Core\I18n\SiteLocaleInterface;
use UserFrosting\Sprinkle\Core\Util\RouteParserInterface;

/**
* Renders a page displaying a group's information, in read-only mode.
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/Permission/PermissionPageAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Interfaces\RouteParserInterface;
use Slim\Views\Twig;
use UserFrosting\Sprinkle\Account\Authenticate\Authenticator;
use UserFrosting\Sprinkle\Account\Database\Models\Interfaces\PermissionInterface;
use UserFrosting\Sprinkle\Account\Exceptions\ForbiddenException;
use UserFrosting\Sprinkle\Core\Util\RouteParserInterface;

/**
* Renders a page displaying a permission's information, in read-only mode.
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/Role/RolePageAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@

use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Interfaces\RouteParserInterface;
use Slim\Views\Twig;
use UserFrosting\Sprinkle\Account\Authenticate\Authenticator;
use UserFrosting\Sprinkle\Account\Database\Models\Interfaces\RoleInterface;
use UserFrosting\Sprinkle\Account\Exceptions\ForbiddenException;
use UserFrosting\Sprinkle\Core\Util\RouteParserInterface;

/**
* Renders a page displaying a role's information, in read-only mode.
Expand Down
2 changes: 1 addition & 1 deletion app/src/Controller/User/UserPageAction.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@

use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Interfaces\RouteParserInterface;
use Slim\Views\Twig;
use UserFrosting\Sprinkle\Account\Authenticate\Authenticator;
use UserFrosting\Sprinkle\Account\Database\Models\Interfaces\UserInterface;
use UserFrosting\Sprinkle\Account\Exceptions\ForbiddenException;
use UserFrosting\Sprinkle\Core\I18n\SiteLocaleInterface;
use UserFrosting\Sprinkle\Core\Util\RouteParserInterface;

/**
* Renders a page displaying a user's information, in read-only mode.
Expand Down
2 changes: 1 addition & 1 deletion app/src/Listener/UserRedirectedToDashboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
namespace UserFrosting\Sprinkle\Admin\Listener;

use Psr\EventDispatcher\StoppableEventInterface;
use Slim\Interfaces\RouteParserInterface;
use UserFrosting\Sprinkle\Account\Authenticate\Authenticator;
use UserFrosting\Sprinkle\Core\Event\Contract\RedirectingEventInterface;
use UserFrosting\Sprinkle\Core\Util\RouteParserInterface;

/**
* Set redirect to dashboard.
Expand Down
2 changes: 1 addition & 1 deletion app/src/Listener/UserRedirectedToSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
namespace UserFrosting\Sprinkle\Admin\Listener;

use Psr\EventDispatcher\StoppableEventInterface;
use Slim\Interfaces\RouteParserInterface;
use UserFrosting\Sprinkle\Account\Authenticate\Authenticator;
use UserFrosting\Sprinkle\Core\Event\Contract\RedirectingEventInterface;
use UserFrosting\Sprinkle\Core\Util\RouteParserInterface;

/**
* Set redirect to dashboard.
Expand Down
2 changes: 1 addition & 1 deletion app/templates/pages/abstract/dashboard.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<header class="main-header">
<!-- Logo -->
{% block navbar_logo %}
<a href="{{ urlFor('index') }}" class="logo">
<a href="{{ urlFor('index', [], [], '/') }}" class="logo">
<i class="fas fa-home"></i>
{{site.title}}
</a>
Expand Down
4 changes: 1 addition & 3 deletions develop/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,7 @@ public function getSprinkles(): array
*/
public function getRoutes(): array
{
return [
Routes::class,
];
return [];
}

/**
Expand Down
26 changes: 0 additions & 26 deletions develop/Routes.php

This file was deleted.

183 changes: 0 additions & 183 deletions develop/templates/pages/index.html.twig

This file was deleted.

0 comments on commit 393f34f

Please sign in to comment.