1010use Admin \App \Common \ServerRequestAwareTrait ;
1111use Admin \App \Pagination ;
1212use Admin \Setting \Entity \Setting ;
13- use Admin \Setting \Service \SettingService ;
1413use Dot \DependencyInjection \Attribute \Inject ;
1514use Laminas \Authentication \AuthenticationServiceInterface ;
1615use Laminas \Diactoros \Response \HtmlResponse ;
@@ -30,15 +29,13 @@ class GetAdminListHandler implements RequestHandlerInterface
3029 TemplateRendererInterface::class,
3130 AuthenticationServiceInterface::class,
3231 AdminForm::class,
33- SettingService::class,
3432 )]
3533 public function __construct (
3634 protected AdminServiceInterface $ adminService ,
3735 protected RouterInterface $ router ,
3836 protected TemplateRendererInterface $ template ,
3937 protected AuthenticationServiceInterface $ authenticationService ,
4038 protected AdminForm $ form ,
41- protected SettingService $ settingService ,
4239 ) {
4340 }
4441
@@ -61,21 +58,13 @@ public function handle(ServerRequestInterface $request): ResponseInterface
6158 $ params ['order ' ],
6259 );
6360
64- $ settings = $ this ->settingService ->findOneBy ([
65- 'admin ' => $ this ->adminService ->getAdminRepository ()->findOneBy ([
66- 'identity ' => $ this ->authenticationService ->getIdentity ()->getIdentity (),
67- ]),
68- 'identifier ' => Setting::IDENTIFIER_TABLE_ADMIN_LIST_SELECTED_COLUMNS ,
69- ]);
70-
7161 $ this ->form ->setAttribute ('action ' , $ this ->router ->generateUri ('admin::admin-create ' ));
7262
7363 return new HtmlResponse (
7464 $ this ->template ->render ('admin::list ' , [
7565 'params ' => $ params ,
7666 'admins ' => $ result ['rows ' ],
7767 'statuses ' => Admin::STATUSES ,
78- 'settings ' => $ settings ?->getValue() ?? [],
7968 'identifier ' => Setting::IDENTIFIER_TABLE_ADMIN_LIST_SELECTED_COLUMNS ,
8069 'form ' => $ this ->form ->prepare (),
8170 'pagination ' => new Pagination ($ result ['total ' ], $ result ['offset ' ], $ result ['limit ' ]),
0 commit comments