File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed
Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change 1414use Symfony \Component \HttpFoundation \Request ;
1515use Strata \Frontend \Exception \NotFoundException ;
1616use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
17+ use Psr \Log \LoggerInterface ;
1718
1819class DigitalBrochureController extends AbstractController
1920{
@@ -25,7 +26,7 @@ class DigitalBrochureController extends AbstractController
2526 protected $ api ;
2627 protected $ formController ;
2728
28- public function __construct (CacheItemPoolInterface $ cache )
29+ public function __construct (CacheItemPoolInterface $ cache, FormController $ formController )
2930 {
3031
3132 $ this ->api = new WordPress (
@@ -36,7 +37,7 @@ public function __construct(CacheItemPoolInterface $cache)
3637 $ psr16Cache = new Psr16Cache ($ cache );
3738 $ this ->api ->setCache ($ psr16Cache );
3839 $ this ->api ->setCacheLifetime (900 );
39- $ this ->formController = new FormController ( $ cache ) ;
40+ $ this ->formController = $ formController ;
4041 }
4142
4243 public function request ($ id , $ slug , Request $ request )
Original file line number Diff line number Diff line change 1414use Symfony \Component \HttpFoundation \Request ;
1515use Strata \Frontend \Exception \NotFoundException ;
1616use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
17+ use Psr \Log \LoggerInterface ;
1718
1819class DownloadableResourceController extends AbstractController
1920{
@@ -25,9 +26,8 @@ class DownloadableResourceController extends AbstractController
2526 protected $ api ;
2627 protected $ formController ;
2728
28- public function __construct (CacheItemPoolInterface $ cache )
29+ public function __construct (CacheItemPoolInterface $ cache, FormController $ formController )
2930 {
30-
3131 $ this ->api = new WordPress (
3232 getenv ('APP_API_BASE_URL ' ),
3333 new ContentModel (__DIR__ . '/../../config/content/content-model.yaml ' )
@@ -36,7 +36,7 @@ public function __construct(CacheItemPoolInterface $cache)
3636 $ psr16Cache = new Psr16Cache ($ cache );
3737 $ this ->api ->setCache ($ psr16Cache );
3838 $ this ->api ->setCacheLifetime (900 );
39- $ this ->formController = new FormController ( $ cache ) ;
39+ $ this ->formController = $ formController ;
4040 }
4141
4242 public function request ($ id , $ slug , Request $ request )
Original file line number Diff line number Diff line change 1414use Symfony \Component \HttpFoundation \Request ;
1515use Strata \Frontend \Exception \NotFoundException ;
1616use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
17+ use Psr \Log \LoggerInterface ;
1718
1819class WebinarController extends AbstractController
1920{
@@ -25,7 +26,7 @@ class WebinarController extends AbstractController
2526 protected $ api ;
2627 protected $ formController ;
2728
28- public function __construct (CacheItemPoolInterface $ cache )
29+ public function __construct (CacheItemPoolInterface $ cache, FormController $ formController )
2930 {
3031 $ this ->api = new Wordpress (
3132 getenv ('APP_API_BASE_URL ' ),
@@ -35,7 +36,7 @@ public function __construct(CacheItemPoolInterface $cache)
3536 $ psr16Cache = new Psr16Cache ($ cache );
3637 $ this ->api ->setCache ($ psr16Cache );
3738 $ this ->api ->setCacheLifetime (900 );
38- $ this ->formController = new FormController ( $ cache ) ;
39+ $ this ->formController = $ formController ;
3940 }
4041
4142 public function request ($ id , $ slug , Request $ request )
Original file line number Diff line number Diff line change 1414use Symfony \Component \HttpFoundation \Request ;
1515use Strata \Frontend \Exception \NotFoundException ;
1616use Symfony \Component \HttpKernel \Exception \NotFoundHttpException ;
17+ use Psr \Log \LoggerInterface ;
1718
1819class WhitepaperController extends AbstractController
1920{
@@ -25,7 +26,7 @@ class WhitepaperController extends AbstractController
2526 protected $ api ;
2627 protected $ formController ;
2728
28- public function __construct (CacheItemPoolInterface $ cache )
29+ public function __construct (CacheItemPoolInterface $ cache, FormController $ formController )
2930 {
3031 $ this ->api = new WordPress (
3132 getenv ('APP_API_BASE_URL ' ),
@@ -35,7 +36,7 @@ public function __construct(CacheItemPoolInterface $cache)
3536 $ psr16Cache = new Psr16Cache ($ cache );
3637 $ this ->api ->setCache ($ psr16Cache );
3738 $ this ->api ->setCacheLifetime (900 );
38- $ this ->formController = new FormController ( $ cache ) ;
39+ $ this ->formController = $ formController ;
3940 }
4041
4142 public function request ($ id , $ slug , Request $ request )
You can’t perform that action at this time.
0 commit comments