@@ 38-44 (lines=7) @@ | ||
35 | * |
|
36 | * @return array An array of functions |
|
37 | */ |
|
38 | public function getFunctions() |
|
39 | { |
|
40 | return array( |
|
41 | new \Twig_SimpleFunction('get_parent_page', array($this, 'getParentPage')), |
|
42 | new \Twig_SimpleFunction('render_indexable_pageparts', array($this, 'renderIndexablePageParts'), array('needs_environment' => true, 'needs_context' => true, 'is_safe' => array('html'))), |
|
43 | ); |
|
44 | } |
|
45 | ||
46 | /** |
|
47 | * @param HasNodeInterface $page |
@@ 32-46 (lines=15) @@ | ||
29 | * |
|
30 | * @return array An array of functions |
|
31 | */ |
|
32 | public function getFunctions() |
|
33 | { |
|
34 | return array( |
|
35 | new \Twig_SimpleFunction( |
|
36 | 'google_analytics_initialize', |
|
37 | array($this, 'renderInitialize'), |
|
38 | array('is_safe' => array('html'), 'needs_environment' => true) |
|
39 | ), |
|
40 | new \Twig_SimpleFunction( |
|
41 | 'google_analytics_track_order', |
|
42 | array($this, 'renderECommerceTracking'), |
|
43 | array('is_safe' => array('html'), 'needs_environment' => true) |
|
44 | ), |
|
45 | ); |
|
46 | } |
|
47 | ||
48 | ||
49 | /** |