forked from Snck3rs/contao-leaflet-maps
Replace insert tags and masked entities. (Fix #17)
This commit is contained in:
@@ -14,6 +14,7 @@ namespace Netzmacht\Contao\Leaflet\Mapper\UI;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\AbstractMapper;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Model\IconModel;
|
||||
use Netzmacht\Contao\Leaflet\ServiceContainerTrait;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Definition\Type\ImageIcon;
|
||||
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
|
||||
@@ -26,6 +27,8 @@ use Netzmacht\LeafletPHP\Definition\UI\Marker;
|
||||
*/
|
||||
class MarkerMapper extends AbstractMapper
|
||||
{
|
||||
use ServiceContainerTrait;
|
||||
|
||||
/**
|
||||
* Class of the model being build.
|
||||
*
|
||||
@@ -79,7 +82,12 @@ class MarkerMapper extends AbstractMapper
|
||||
) {
|
||||
if ($definition instanceof Marker) {
|
||||
if ($model->addPopup) {
|
||||
$definition->bindPopup($model->popupContent);
|
||||
$content = $this
|
||||
->getServiceContainer()
|
||||
->getFrontendValueFilter()
|
||||
->filter($model->popupContent);
|
||||
|
||||
$definition->bindPopup($content);
|
||||
}
|
||||
|
||||
if ($model->customIcon) {
|
||||
|
||||
@@ -15,6 +15,7 @@ use Netzmacht\Contao\Leaflet\Definition\Style;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\AbstractTypeMapper;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Model\StyleModel;
|
||||
use Netzmacht\Contao\Leaflet\ServiceContainerTrait;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Definition\HasPopup;
|
||||
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
|
||||
@@ -27,6 +28,8 @@ use Netzmacht\LeafletPHP\Definition\Vector\Path;
|
||||
*/
|
||||
class AbstractVectorMapper extends AbstractTypeMapper
|
||||
{
|
||||
use ServiceContainerTrait;
|
||||
|
||||
/**
|
||||
* Class of the model being build.
|
||||
*
|
||||
@@ -59,7 +62,12 @@ class AbstractVectorMapper extends AbstractTypeMapper
|
||||
}
|
||||
|
||||
if ($definition instanceof HasPopup && $model->addPopup) {
|
||||
$definition->bindPopup($model->popupContent);
|
||||
$content = $this
|
||||
->getServiceContainer()
|
||||
->getFrontendValueFilter()
|
||||
->filter($model->popupContent);
|
||||
|
||||
$definition->bindPopup($content);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user