2626 */
2727class CategoryPageResponseSubscriber implements EventSubscriberInterface
2828{
29- private bool $ httpCacheEnabled ;
3029 private EntityRepository $ categoryRepository ;
3130 private Communication $ config ;
3231 private SearchAdapter $ searchAdapter ;
@@ -35,15 +34,13 @@ class CategoryPageResponseSubscriber implements EventSubscriberInterface
3534 private EventDispatcherInterface $ eventDispatcher ;
3635
3736 public function __construct (
38- bool $ httpCacheEnabled ,
3937 EntityRepository $ categoryRepository ,
4038 Communication $ config ,
4139 SearchAdapter $ searchAdapter ,
4240 Engine $ handlebars ,
4341 CategoryPath $ categoryPath ,
4442 EventDispatcherInterface $ eventDispatcher ,
4543 ) {
46- $ this ->httpCacheEnabled = $ httpCacheEnabled ;
4744 $ this ->categoryRepository = $ categoryRepository ;
4845 $ this ->config = $ config ;
4946 $ this ->searchAdapter = $ searchAdapter ;
@@ -125,10 +122,6 @@ private function getCategoryPath(Request $request): string
125122 return '' ;
126123 }
127124
128- if ($ this ->httpCacheEnabled === false ) {
129- return $ request ->attributes ->get ('categoryPath ' , '' );
130- }
131-
132125 $ criteria = new Criteria ();
133126 $ criteria ->addFilter (new EqualsFilter ('id ' , $ categoryId ));
134127 $ category = $ this ->categoryRepository ->search ($ criteria , Context::createDefaultContext ())->first ();
0 commit comments