From 75cb7676258b26100a635f04573b3a7c2a57387b Mon Sep 17 00:00:00 2001 From: David Molineus Date: Fri, 30 Oct 2015 23:19:55 +0100 Subject: [PATCH] Use the insertTag replacer of the toolkit. --- module/config/services.php | 4 ++-- src/Netzmacht/Contao/Leaflet/Frontend/ValueFilter.php | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/module/config/services.php b/module/config/services.php index e0da136..fe95276 100644 --- a/module/config/services.php +++ b/module/config/services.php @@ -113,8 +113,8 @@ $container['leaflet.definition.builder'] = $container->share(function($container return $boot->initializeLeafletBuilder($leaflet); }); -$container['leaflet.frontend.value-filter'] = $container->share(function() { - return new ValueFilter(new InsertTagReplacer()); +$container['leaflet.frontend.value-filter'] = $container->share(function($container) { + return new ValueFilter($container['toolkit.insert-tag-replacer']); }); $container['leaflet.service-container'] = $container->share(function($container) { diff --git a/src/Netzmacht/Contao/Leaflet/Frontend/ValueFilter.php b/src/Netzmacht/Contao/Leaflet/Frontend/ValueFilter.php index 8975e87..28f6428 100644 --- a/src/Netzmacht/Contao/Leaflet/Frontend/ValueFilter.php +++ b/src/Netzmacht/Contao/Leaflet/Frontend/ValueFilter.php @@ -11,7 +11,7 @@ namespace Netzmacht\Contao\Leaflet\Frontend; -use Netzmacht\Contao\Leaflet\Frontend\Helper\InsertTagReplacer; +use Netzmacht\Contao\Toolkit\InsertTag\Replacer; /** * Class ValueFilter is a service class which can be used to filter values before passing them to an definition object. @@ -21,16 +21,16 @@ use Netzmacht\Contao\Leaflet\Frontend\Helper\InsertTagReplacer; class ValueFilter { /** - * The frontend api of Contao. + * The insert tag replacer. * - * @var InsertTagReplacer + * @var Replacer */ private $insertTagReplacer; /** * Construct. * - * @param InsertTagReplacer $replacer The insert tag replacer. + * @param Replacer $replacer The insert tag replacer. */ public function __construct($replacer) {