diff --git a/module/config/services.php b/module/config/services.php index c9959b5..bd589ab 100644 --- a/module/config/services.php +++ b/module/config/services.php @@ -21,6 +21,7 @@ use Netzmacht\JavascriptBuilder\Encoder\Chain\MultipleChain; use Netzmacht\JavascriptBuilder\Encoder\ChainEncoder; use Netzmacht\JavascriptBuilder\Encoder\JavascriptEncoder; use Netzmacht\JavascriptBuilder\Encoder\MultipleObjectsEncoder; +use Netzmacht\JavascriptBuilder\Flags; use Netzmacht\JavascriptBuilder\Output; use Netzmacht\JavascriptBuilder\Symfony\EventDispatchingEncoder; use Netzmacht\LeafletPHP\Leaflet; @@ -99,7 +100,7 @@ $container['leaflet.definition.builder'] = $container->share(function($container $factory = $container['leaflet.definition.builder.encoder-factory']; $builder = new Builder($factory); - $leaflet = new Leaflet($builder, $dispatcher, array(), JSON_UNESCAPED_SLASHES ^ Encoder::BUILD_STACK); + $leaflet = new Leaflet($builder, $dispatcher, array(), JSON_UNESCAPED_SLASHES ^ Flags::BUILD_STACK); return $boot->initializeLeafletBuilder($leaflet); }); diff --git a/src/Netzmacht/Contao/Leaflet/Subscriber/EncoderSubscriber.php b/src/Netzmacht/Contao/Leaflet/Subscriber/EncoderSubscriber.php index 791fddf..f4897b2 100644 --- a/src/Netzmacht/Contao/Leaflet/Subscriber/EncoderSubscriber.php +++ b/src/Netzmacht/Contao/Leaflet/Subscriber/EncoderSubscriber.php @@ -13,6 +13,7 @@ namespace Netzmacht\Contao\Leaflet\Subscriber; use Netzmacht\Contao\Leaflet\Frontend\RequestUrl; use Netzmacht\JavascriptBuilder\Encoder; +use Netzmacht\JavascriptBuilder\Flags; use Netzmacht\JavascriptBuilder\Symfony\Event\EncodeValueEvent; use Netzmacht\JavascriptBuilder\Symfony\Event\EncodeReferenceEvent; use Netzmacht\JavascriptBuilder\Exception\EncodeValueFailed; @@ -118,7 +119,7 @@ class EncoderSubscriber implements EventSubscriberInterface ); foreach ($value->getMethodCalls() as $call) { - $event->addLine($call->encode($encoder, Encoder::CLOSE_STATEMENT)); + $event->addLine($call->encode($encoder, Flags::CLOSE_STATEMENT)); } } }