File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66
77use App \Entity \OIDC ;
88use App \Repository \SiteRepository ;
9- use App \Service \Exporter ;
109use App \Trait \ExportCrudControllerTrait ;
1110use EasyCorp \Bundle \EasyAdminBundle \Config \Action ;
1211use EasyCorp \Bundle \EasyAdminBundle \Config \Actions ;
@@ -24,10 +23,8 @@ class OIDCCrudController extends AbstractCrudController
2423 use ExportCrudControllerTrait;
2524
2625 public function __construct (
27- Exporter $ exporter ,
2826 private readonly SiteRepository $ siteRepository )
2927 {
30- $ this ->setExporter ($ exporter );
3128 }
3229
3330 public static function getEntityFqcn (): string
Original file line number Diff line number Diff line change 99use App \Form \Type \Admin \MariaDbVersionFilter ;
1010use App \Form \Type \Admin \ServerTypeFilter ;
1111use App \Form \Type \Admin \SystemFilter ;
12- use App \Service \Exporter ;
1312use App \Trait \ExportCrudControllerTrait ;
1413use App \Types \DatabaseVersionType ;
1514use App \Types \HostingProviderType ;
@@ -34,10 +33,8 @@ class ServerCrudController extends AbstractCrudController
3433 use ExportCrudControllerTrait;
3534
3635 public function __construct (
37- Exporter $ exporter ,
3836 private readonly RequestStack $ requestStack ,
3937 ) {
40- $ this ->setExporter ($ exporter );
4138 }
4239
4340 public static function getEntityFqcn (): string
Original file line number Diff line number Diff line change 1212use App \Admin \Field \SiteTypeField ;
1313use App \Admin \Field \VersionField ;
1414use App \Entity \Site ;
15- use App \Service \Exporter ;
1615use App \Trait \ExportCrudControllerTrait ;
1716use EasyCorp \Bundle \EasyAdminBundle \Config \Action ;
1817use EasyCorp \Bundle \EasyAdminBundle \Config \Actions ;
@@ -26,9 +25,8 @@ class SiteCrudController extends AbstractCrudController
2625{
2726 use ExportCrudControllerTrait;
2827
29- public function __construct (Exporter $ exporter )
28+ public function __construct ()
3029 {
31- $ this ->setExporter ($ exporter );
3230 }
3331
3432 public static function getEntityFqcn (): string
Original file line number Diff line number Diff line change 1313use EasyCorp \Bundle \EasyAdminBundle \Factory \FilterFactory ;
1414use Symfony \Component \HttpFoundation \Response ;
1515use Symfony \Component \Translation \TranslatableMessage ;
16+ use Symfony \Contracts \Service \Attribute \Required ;
1617
1718trait ExportCrudControllerTrait
1819{
1920 private FilterFactory $ filterFactory ;
21+ private Exporter $ exporter ;
2022
21- /**
22- * @required
23- */
24- public function autowireExportCrudControllerTrait (FilterFactory $ filterFactory ): void
23+ #[Required]
24+ public function setFilterFactory (FilterFactory $ filterFactory ): void
2525 {
2626 $ this ->filterFactory = $ filterFactory ;
2727 }
28- private Exporter $ exporter ;
2928
30- protected function setExporter (Exporter $ exporter ): void
29+ #[Required]
30+ public function setExporter (Exporter $ exporter ): void
3131 {
3232 $ this ->exporter = $ exporter ;
3333 }
You can’t perform that action at this time.
0 commit comments