19
19
use Pagerfanta \Adapter \AdapterInterface ;
20
20
use Symfony \Component \HttpFoundation \Request ;
21
21
use Symfony \Component \HttpFoundation \Response ;
22
- use Symfony \Contracts \Translation \TranslatorInterface ;
23
22
use function count ;
24
23
use function in_array ;
25
24
use function trim ;
@@ -36,11 +35,6 @@ final class TagController extends Controller
36
35
*/
37
36
private $ contentTypeService ;
38
37
39
- /**
40
- * @var \Symfony\Contracts\Translation\TranslatorInterface
41
- */
42
- private $ translator ;
43
-
44
38
/**
45
39
* @var \Pagerfanta\Adapter\AdapterInterface
46
40
*/
@@ -54,13 +48,11 @@ final class TagController extends Controller
54
48
public function __construct (
55
49
TagsService $ tagsService ,
56
50
ContentTypeService $ contentTypeService ,
57
- TranslatorInterface $ translator ,
58
51
AdapterInterface $ tagChildrenAdapter ,
59
52
SearchTagsAdapter $ searchTagsAdapter
60
53
) {
61
54
$ this ->tagsService = $ tagsService ;
62
55
$ this ->contentTypeService = $ contentTypeService ;
63
- $ this ->translator = $ translator ;
64
56
$ this ->tagChildrenAdapter = $ tagChildrenAdapter ;
65
57
$ this ->searchTagsAdapter = $ searchTagsAdapter ;
66
58
}
@@ -492,7 +484,7 @@ public function translationAction(Request $request, Tag $tag): Response
492
484
*/
493
485
public function childrenAction (Request $ request , ?Tag $ tag = null ): Response
494
486
{
495
- if (count ((array ) $ request ->request ->get ('Tags ' ) ?? [] ) === 0 ) {
487
+ if (count ((array ) $ request ->request ->get ('Tags ' )) === 0 ) {
496
488
$ this ->addFlashMessage ('errors ' , 'no_selected_tags ' );
497
489
498
490
return $ this ->redirectToTag ($ tag );
0 commit comments