Replace insert tags and masked entities. (Fix #17)

This commit is contained in:
David Molineus
2015-01-22 12:24:22 +01:00
parent b65bcbff9f
commit 9dfb6698cf
7 changed files with 202 additions and 2 deletions

View File

@@ -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) {