Use a different way to use piwik

This commit is contained in:
Jeremy Benoist 2016-02-22 10:58:43 +01:00
parent 07643dde08
commit 077ddbe1ae
3 changed files with 5 additions and 18 deletions

View file

@ -20,10 +20,8 @@ services:
- { name: twig.extension }
wallabag.twig_piwik_extension:
class: Wallabag\CoreBundle\Twig\WallabagPiwikExtension
class: PiwikTwigExtension\PiwikTwigExtension
public: false
arguments:
- "@craue_config"
tags:
- { name: twig.extension }

View file

@ -71,6 +71,9 @@
<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>

View file

@ -1,14 +0,0 @@
<?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'));
}
}