Skip to content

Commit 70f2b01

Browse files
committed
requested changes
1 parent 647a8f4 commit 70f2b01

38 files changed

+718
-314
lines changed

config/autoload/navigation.global.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,15 +31,15 @@
3131
'options' => [
3232
'label' => 'Admins',
3333
'route' => [
34-
'route_name' => 'admin::list',
34+
'route_name' => 'admin::list-admins',
3535
],
3636
],
3737
],
3838
[
3939
'options' => [
4040
'label' => 'Logins',
4141
'route' => [
42-
'route_name' => 'admin::list-logins',
42+
'route_name' => 'admin::list-admin-logins',
4343
],
4444
],
4545
],
@@ -65,7 +65,7 @@
6565
'options' => [
6666
'label' => 'Profile',
6767
'route' => [
68-
'route_name' => 'admin::account',
68+
'route_name' => 'admin::account-form',
6969
],
7070
'icon' => 'ti-user',
7171
],

phpstan.neon

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ parameters:
2121
path: src
2222
-
2323
message: '#Call to an undefined method Laminas\\Authentication\\AuthenticationServiceInterface::getAdapter\(\)#'
24-
path: src/Admin/src/Controller/AdminController.php
24+
path: src/Admin/src/Handler/Account/LoginHandler.php
2525
-
2626
message: '#Call to an undefined method Laminas\\Authentication\\AuthenticationServiceInterface::getStorage\(\)#'
27-
path: src/Admin/src/Controller/AdminController.php
27+
path: src/Admin/src/Handler/Account/LoginHandler.php
2828

src/Admin/src/ConfigProvider.php

Lines changed: 37 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,20 @@
1414
use Admin\Admin\Form\AdminForm;
1515
use Admin\Admin\Form\ChangePasswordForm;
1616
use Admin\Admin\Form\LoginForm;
17-
use Admin\Admin\Handler\AdminListHandler;
18-
use Admin\Admin\Handler\AdminListLoginHandler;
19-
use Admin\Admin\Handler\ChangePasswordHandler;
20-
use Admin\Admin\Handler\CreateAdminHandler;
21-
use Admin\Admin\Handler\DeleteAdminHandler;
22-
use Admin\Admin\Handler\EditAccountHandler;
23-
use Admin\Admin\Handler\EditAdminHandler;
24-
use Admin\Admin\Handler\GetAccountFormHandler;
25-
use Admin\Admin\Handler\GetAdminFormHandler;
26-
use Admin\Admin\Handler\GetDeleteAdminFormHandler;
27-
use Admin\Admin\Handler\GetEditAdminFormHandler;
28-
use Admin\Admin\Handler\GetLoginFormHandler;
29-
use Admin\Admin\Handler\LoginHandler;
30-
use Admin\Admin\Handler\LogoutHandler;
17+
use Admin\Admin\Handler\Account\ChangePasswordHandler;
18+
use Admin\Admin\Handler\Account\EditAdminAccountResourceHandler;
19+
use Admin\Admin\Handler\Account\GetAdminAccountFormHandler;
20+
use Admin\Admin\Handler\Account\GetAdminLoginFormHandler;
21+
use Admin\Admin\Handler\Account\LoginHandler;
22+
use Admin\Admin\Handler\Account\LogoutHandler;
23+
use Admin\Admin\Handler\Admin\DeleteAdminResourceHandler;
24+
use Admin\Admin\Handler\Admin\EditAdminResourceHandler;
25+
use Admin\Admin\Handler\Admin\GetAdminCollectionHandler;
26+
use Admin\Admin\Handler\Admin\GetAdminCreateFormHandler;
27+
use Admin\Admin\Handler\Admin\GetAdminDeleteFormHandler;
28+
use Admin\Admin\Handler\Admin\GetAdminEditFormHandler;
29+
use Admin\Admin\Handler\Admin\GetAdminListCollectionHandler;
30+
use Admin\Admin\Handler\Admin\PostAdminResourceHandler;
3131
use Admin\Admin\Repository\AdminLoginRepository;
3232
use Admin\Admin\Repository\AdminRepository;
3333
use Admin\Admin\Repository\AdminRoleRepository;
@@ -66,29 +66,29 @@ public function getDependencies(): array
6666
],
6767
],
6868
'factories' => [
69-
AdminController::class => AttributedServiceFactory::class,
70-
GetAdminFormHandler::class => AttributedServiceFactory::class,
71-
CreateAdminHandler::class => AttributedServiceFactory::class,
72-
GetEditAdminFormHandler::class => AttributedServiceFactory::class,
73-
EditAdminHandler::class => AttributedServiceFactory::class,
74-
GetDeleteAdminFormHandler::class => AttributedServiceFactory::class,
75-
DeleteAdminHandler::class => AttributedServiceFactory::class,
76-
AdminListHandler::class => AttributedServiceFactory::class,
77-
AdminListLoginHandler::class => AttributedServiceFactory::class,
78-
GetAccountFormHandler::class => AttributedServiceFactory::class,
79-
EditAccountHandler::class => AttributedServiceFactory::class,
80-
ChangePasswordHandler::class => AttributedServiceFactory::class,
81-
GetLoginFormHandler::class => AttributedServiceFactory::class,
82-
LoginHandler::class => AttributedServiceFactory::class,
83-
LogoutHandler::class => AttributedServiceFactory::class,
84-
AdminService::class => AttributedServiceFactory::class,
85-
AdminRoleService::class => AttributedServiceFactory::class,
86-
AdminRepository::class => AttributedRepositoryFactory::class,
87-
AdminRoleRepository::class => AttributedRepositoryFactory::class,
88-
AdminLoginRepository::class => AttributedRepositoryFactory::class,
89-
AdminForm::class => ElementFactory::class,
90-
AuthenticationService::class => AuthenticationServiceFactory::class,
91-
AuthenticationAdapter::class => AttributedServiceFactory::class,
69+
AdminController::class => AttributedServiceFactory::class,
70+
GetAdminCreateFormHandler::class => AttributedServiceFactory::class,
71+
PostAdminResourceHandler::class => AttributedServiceFactory::class,
72+
GetAdminEditFormHandler::class => AttributedServiceFactory::class,
73+
EditAdminResourceHandler::class => AttributedServiceFactory::class,
74+
GetAdminDeleteFormHandler::class => AttributedServiceFactory::class,
75+
DeleteAdminResourceHandler::class => AttributedServiceFactory::class,
76+
GetAdminCollectionHandler::class => AttributedServiceFactory::class,
77+
GetAdminListCollectionHandler::class => AttributedServiceFactory::class,
78+
GetAdminAccountFormHandler::class => AttributedServiceFactory::class,
79+
EditAdminAccountResourceHandler::class => AttributedServiceFactory::class,
80+
ChangePasswordHandler::class => AttributedServiceFactory::class,
81+
GetAdminLoginFormHandler::class => AttributedServiceFactory::class,
82+
LoginHandler::class => AttributedServiceFactory::class,
83+
LogoutHandler::class => AttributedServiceFactory::class,
84+
AdminService::class => AttributedServiceFactory::class,
85+
AdminRoleService::class => AttributedServiceFactory::class,
86+
AdminRepository::class => AttributedRepositoryFactory::class,
87+
AdminRoleRepository::class => AttributedRepositoryFactory::class,
88+
AdminLoginRepository::class => AttributedRepositoryFactory::class,
89+
AdminForm::class => ElementFactory::class,
90+
AuthenticationService::class => AuthenticationServiceFactory::class,
91+
AuthenticationAdapter::class => AttributedServiceFactory::class,
9292
],
9393
'aliases' => [
9494
AdminInterface::class => Admin::class,

src/Admin/src/Handler/ChangePasswordHandler.php renamed to src/Admin/src/Handler/Account/ChangePasswordHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Admin\Admin\Handler;
5+
namespace Admin\Admin\Handler\Account;
66

77
use Admin\Admin\Entity\AdminIdentity;
88
use Admin\Admin\Form\AccountForm;
@@ -92,6 +92,6 @@ public function handle(ServerRequestInterface $request): ResponseInterface
9292
$this->messenger->addError(Message::AN_ERROR_OCCURRED);
9393
}
9494

95-
return new RedirectResponse($this->router->generateUri('admin::account'));
95+
return new RedirectResponse($this->router->generateUri('admin::account-form'));
9696
}
9797
}

src/Admin/src/Handler/EditAccountHandler.php renamed to src/Admin/src/Handler/Account/EditAdminAccountResourceHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Admin\Admin\Handler;
5+
namespace Admin\Admin\Handler\Account;
66

77
use Admin\Admin\Form\AccountForm;
88
use Admin\Admin\Form\ChangePasswordForm;
@@ -23,7 +23,7 @@
2323
use Psr\Http\Server\RequestHandlerInterface;
2424
use Throwable;
2525

26-
class EditAccountHandler implements RequestHandlerInterface
26+
class EditAdminAccountResourceHandler implements RequestHandlerInterface
2727
{
2828
use ServerRequestAwareTrait;
2929

src/Admin/src/Handler/GetAccountFormHandler.php renamed to src/Admin/src/Handler/Account/GetAdminAccountFormHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Admin\Admin\Handler;
5+
namespace Admin\Admin\Handler\Account;
66

77
use Admin\Admin\Form\AccountForm;
88
use Admin\Admin\Form\ChangePasswordForm;
@@ -16,7 +16,7 @@
1616
use Psr\Http\Message\ServerRequestInterface;
1717
use Psr\Http\Server\RequestHandlerInterface;
1818

19-
class GetAccountFormHandler implements RequestHandlerInterface
19+
class GetAdminAccountFormHandler implements RequestHandlerInterface
2020
{
2121
#[Inject(
2222
AdminServiceInterface::class,

src/Admin/src/Handler/GetLoginFormHandler.php renamed to src/Admin/src/Handler/Account/GetAdminLoginFormHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Admin\Admin\Handler;
5+
namespace Admin\Admin\Handler\Account;
66

77
use Admin\Admin\Form\LoginForm;
88
use Admin\App\Plugin\FormsPlugin;
@@ -17,7 +17,7 @@
1717
use Psr\Http\Message\ServerRequestInterface;
1818
use Psr\Http\Server\RequestHandlerInterface;
1919

20-
class GetLoginFormHandler implements RequestHandlerInterface
20+
class GetAdminLoginFormHandler implements RequestHandlerInterface
2121
{
2222
#[Inject(
2323
RouterInterface::class,

src/Admin/src/Handler/LoginHandler.php renamed to src/Admin/src/Handler/Account/LoginHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Admin\Admin\Handler;
5+
namespace Admin\Admin\Handler\Account;
66

77
use Admin\Admin\Adapter\AuthenticationAdapter;
88
use Admin\Admin\Entity\Admin;

src/Admin/src/Handler/LogoutHandler.php renamed to src/Admin/src/Handler/Account/LogoutHandler.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Admin\Admin\Handler;
5+
namespace Admin\Admin\Handler\Account;
66

77
use Dot\DependencyInjection\Attribute\Inject;
88
use Laminas\Authentication\AuthenticationServiceInterface;

src/Admin/src/Handler/DeleteAdminHandler.php renamed to src/Admin/src/Handler/Admin/DeleteAdminResourceHandler.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Admin\Admin\Handler;
5+
namespace Admin\Admin\Handler\Admin;
66

77
use Admin\Admin\Entity\Admin;
88
use Admin\Admin\Form\AdminDeleteForm;
@@ -21,7 +21,7 @@
2121
use Psr\Http\Server\RequestHandlerInterface;
2222
use Throwable;
2323

24-
class DeleteAdminHandler implements RequestHandlerInterface
24+
class DeleteAdminResourceHandler implements RequestHandlerInterface
2525
{
2626
#[Inject(
2727
AdminServiceInterface::class,

0 commit comments

Comments
 (0)