1 | <?php |
||
20 | final class RenderPageLinkByCodeExtension extends \Twig_Extension |
||
21 | { |
||
22 | const PAGE_LINK_TEMPLATE = 'BitBagCmsPlugin:Shop:Page:_link.html.twig'; |
||
23 | |||
24 | /** |
||
25 | * @var PageRepositoryInterface |
||
26 | */ |
||
27 | private $pageRepository; |
||
28 | |||
29 | /** |
||
30 | * @var LoggerInterface |
||
31 | */ |
||
32 | private $logger; |
||
33 | |||
34 | /** |
||
35 | * @param PageRepositoryInterface $pageRepository |
||
36 | * @param LoggerInterface $logger |
||
37 | */ |
||
38 | public function __construct( |
||
46 | |||
47 | /** |
||
48 | * @return \Twig_SimpleFunction[] |
||
49 | */ |
||
50 | public function getFunctions() |
||
56 | |||
57 | /** |
||
58 | * @param \Twig_Environment $twigEnvironment |
||
59 | * @param string $code |
||
60 | * |
||
61 | * @return null|string |
||
62 | */ |
||
63 | public function renderPageLinkByCode(\Twig_Environment $twigEnvironment, $code) |
||
79 | } |
||
80 |