Refactor the mappers to use the filters.

This commit is contained in:
David Molineus
2015-01-24 21:37:25 +01:00
parent 05d3acf21d
commit 37b10c14fe
26 changed files with 121 additions and 133 deletions

View File

@@ -11,10 +11,10 @@
namespace Netzmacht\Contao\Leaflet\Mapper\Layer;
use Netzmacht\Contao\Leaflet\Filter\Filter;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\Model\LayerModel;
use Netzmacht\LeafletPHP\Definition;
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
/**
* Class ReferenceLayerMapper maps an reference layer to another layer.
@@ -36,7 +36,7 @@ class ReferenceLayerMapper extends AbstractLayerMapper
public function handle(
$model,
DefinitionMapper $mapper,
LatLngBounds $bounds = null,
Filter $filter = null,
$elementId = null,
Definition $parent = null
) {
@@ -48,6 +48,6 @@ class ReferenceLayerMapper extends AbstractLayerMapper
$elementId = $model->standalone ? $this->getElementId($model, $elementId) : null;
return $mapper->handle($reference, $bounds, $elementId);
return $mapper->handle($reference, $filter, $elementId);
}
}