- { name: twig.extension }
wallabag.twig_piwik_extension:
- class: Wallabag\CoreBundle\Twig\WallabagPiwikExtension
+ class: PiwikTwigExtension\PiwikTwigExtension
public: false
- arguments:
- - "@craue_config"
tags:
- { name: twig.extension }
<div id="warning_message">
You're trying wallabag v2, which is in alpha version. If you find a bug, please have a look to <a href="https://github.com/wallabag/wallabag/issues">our issues list</a> and <a href="https://github.com/wallabag/wallabag/issues/new">open a new if necessary</a>
</div>
- {{ piwik() }}
+
+ {% if craue_setting('piwik_enabled') %}
+ {{ piwik(craue_setting('piwik_host'), craue_setting('piwik_site_id')) }}
+ {% endif %}
</body>
</html>
+++ /dev/null
-<?php
-
-namespace Wallabag\CoreBundle\Twig;
-
-use Craue\ConfigBundle\Util\Config;
-use PiwikTwigExtension\PiwikTwigExtension;
-
-class WallabagPiwikExtension extends PiwikTwigExtension
-{
- public function __construct(Config $craueConfig)
- {
- parent::__construct($craueConfig->get('piwik_host'), $craueConfig->get('piwik_site_id'), $craueConfig->get('piwik_enabled'));
- }
-}