Do not use insert tag replacer to remove circular reference to map provider.

This commit is contained in:
David Molineus
2017-10-09 14:46:24 +02:00
parent 3c9a54c7e1
commit 1e315d9bc5
2 changed files with 2 additions and 21 deletions

View File

@@ -12,7 +12,7 @@
namespace Netzmacht\Contao\Leaflet\Frontend; 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. * 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 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. * Filter a value so it can be passed to the frontend.
* *
@@ -50,6 +33,6 @@ class ValueFilter
*/ */
public function filter($value) public function filter($value)
{ {
return $this->insertTagReplacer->replace($value); return Controller::replaceInsertTags($value);
} }
} }

View File

@@ -30,8 +30,6 @@ services:
netzmacht.contao_leaflet_maps.frontend.value_filter: netzmacht.contao_leaflet_maps.frontend.value_filter:
class: Netzmacht\Contao\Leaflet\Frontend\ValueFilter class: Netzmacht\Contao\Leaflet\Frontend\ValueFilter
arguments:
- '@netzmacht.contao_toolkit.insert_tag.replacer'
netzmacht.contao_leaflet_maps.map.assets: netzmacht.contao_leaflet_maps.map.assets:
class: Netzmacht\Contao\Leaflet\ContaoAssets class: Netzmacht\Contao\Leaflet\ContaoAssets