1 | <?php |
||
24 | abstract class AbstractPostArchiveAction extends Controller |
||
25 | { |
||
26 | /** |
||
27 | * @var BlogInterface |
||
28 | */ |
||
29 | private $blog; |
||
30 | |||
31 | /** |
||
32 | * @var PostManagerInterface |
||
33 | */ |
||
34 | private $postManager; |
||
35 | |||
36 | /** |
||
37 | * @var TranslatorInterface |
||
38 | */ |
||
39 | private $translator; |
||
40 | |||
41 | /** |
||
42 | * @var SeoPageInterface|null |
||
43 | */ |
||
44 | private $seoPage; |
||
45 | |||
46 | public function __construct(BlogInterface $blog, PostManagerInterface $postManager, TranslatorInterface $translator) |
||
52 | |||
53 | /** |
||
54 | * @internal |
||
55 | * |
||
56 | * NEXT_MAJOR: make this method protected |
||
57 | * |
||
58 | * @return Response |
||
59 | */ |
||
60 | final public function renderArchive(Request $request, array $criteria = [], array $parameters = []) |
||
87 | |||
88 | /** |
||
89 | * @param null|SeoPageInterface $seoPage |
||
90 | */ |
||
91 | public function setSeoPage(SeoPageInterface $seoPage = null): void |
||
95 | |||
96 | /** |
||
97 | * @param string $id |
||
98 | * @param string|null $domain |
||
99 | * @param string|null $locale |
||
100 | * |
||
101 | * @return string |
||
102 | */ |
||
103 | final protected function trans($id, array $parameters = [], $domain = 'SonataNewsBundle', $locale = null) |
||
107 | |||
108 | /** |
||
109 | * @return BlogInterface |
||
110 | */ |
||
111 | final protected function getBlog() |
||
115 | |||
116 | /** |
||
117 | * @return null|SeoPageInterface |
||
118 | */ |
||
119 | final protected function getSeoPage() |
||
123 | |||
124 | /** |
||
125 | * @return PostManagerInterface |
||
126 | */ |
||
127 | final protected function getPostManager() |
||
131 | } |
||
132 |