From 1e315d9bc5e695c7e88ad4fef60aa9ad208ce0dd Mon Sep 17 00:00:00 2001 From: David Molineus Date: Mon, 9 Oct 2017 14:46:24 +0200 Subject: [PATCH] Do not use insert tag replacer to remove circular reference to map provider. --- src/Frontend/ValueFilter.php | 21 ++------------------- src/Resources/config/services.yml | 2 -- 2 files changed, 2 insertions(+), 21 deletions(-) diff --git a/src/Frontend/ValueFilter.php b/src/Frontend/ValueFilter.php index 253da7c..206fdb6 100644 --- a/src/Frontend/ValueFilter.php +++ b/src/Frontend/ValueFilter.php @@ -12,7 +12,7 @@ namespace Netzmacht\Contao\Leaflet\Frontend; -use Netzmacht\Contao\Toolkit\InsertTag\Replacer; +use Contao\Controller; /** * Class ValueFilter is a service class which can be used to filter values before passing them to an definition object. @@ -21,23 +21,6 @@ use Netzmacht\Contao\Toolkit\InsertTag\Replacer; */ class ValueFilter { - /** - * The insert tag replacer. - * - * @var Replacer - */ - private $insertTagReplacer; - - /** - * Construct. - * - * @param Replacer $replacer The insert tag replacer. - */ - public function __construct($replacer) - { - $this->insertTagReplacer = $replacer; - } - /** * Filter a value so it can be passed to the frontend. * @@ -50,6 +33,6 @@ class ValueFilter */ public function filter($value) { - return $this->insertTagReplacer->replace($value); + return Controller::replaceInsertTags($value); } } diff --git a/src/Resources/config/services.yml b/src/Resources/config/services.yml index 2b02eda..c655129 100644 --- a/src/Resources/config/services.yml +++ b/src/Resources/config/services.yml @@ -30,8 +30,6 @@ services: netzmacht.contao_leaflet_maps.frontend.value_filter: class: Netzmacht\Contao\Leaflet\Frontend\ValueFilter - arguments: - - '@netzmacht.contao_toolkit.insert_tag.replacer' netzmacht.contao_leaflet_maps.map.assets: class: Netzmacht\Contao\Leaflet\ContaoAssets