forked from Snck3rs/contao-leaflet-maps
Add parent to mapper handle method.
This commit is contained in:
@@ -58,7 +58,8 @@ class GroupLayerMapper extends AbstractLayerMapper
|
||||
Definition $definition,
|
||||
\Model $model,
|
||||
DefinitionMapper $mapper,
|
||||
LatLngBounds $bounds = null
|
||||
LatLngBounds $bounds = null,
|
||||
Definition $parent = null
|
||||
) {
|
||||
if (!$definition instanceof LayerGroup) {
|
||||
return;
|
||||
|
||||
@@ -86,7 +86,8 @@ class MarkersLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
|
||||
Definition $definition,
|
||||
\Model $model,
|
||||
DefinitionMapper $mapper,
|
||||
LatLngBounds $bounds = null
|
||||
LatLngBounds $bounds = null,
|
||||
Definition $parent = null
|
||||
) {
|
||||
if ($definition instanceof GeoJson) {
|
||||
$collection = $this->loadMarkerModels($model);
|
||||
|
||||
@@ -73,8 +73,9 @@ class ProviderLayerMapper extends AbstractLayerMapper
|
||||
protected function build(
|
||||
Definition $definition,
|
||||
\Model $model,
|
||||
DefinitionMapper $builder,
|
||||
LatLngBounds $bounds = null
|
||||
DefinitionMapper $mapper,
|
||||
LatLngBounds $bounds = null,
|
||||
Definition $parent = null
|
||||
) {
|
||||
if (!empty($this->providers[$model->tile_provider]['options'])) {
|
||||
$this->applyOptions(
|
||||
|
||||
@@ -13,6 +13,7 @@ namespace Netzmacht\Contao\Leaflet\Mapper\Layer;
|
||||
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
|
||||
|
||||
/**
|
||||
@@ -32,7 +33,7 @@ class ReferenceLayerMapper extends AbstractLayerMapper
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function handle($model, DefinitionMapper $mapper, LatLngBounds $bounds = null, $elementId = null)
|
||||
public function handle($model, DefinitionMapper $mapper, LatLngBounds $bounds = null, $elementId = null, Definition $parent = null)
|
||||
{
|
||||
$reference = LayerModel::findByPk($model->reference);
|
||||
|
||||
|
||||
@@ -100,7 +100,8 @@ class VectorsLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
|
||||
Definition $definition,
|
||||
\Model $model,
|
||||
DefinitionMapper $mapper,
|
||||
LatLngBounds $bounds = null
|
||||
LatLngBounds $bounds = null,
|
||||
Definition $parent = null
|
||||
) {
|
||||
if ($definition instanceof GeoJson) {
|
||||
$collection = $this->loadVectorModels($model);
|
||||
|
||||
Reference in New Issue
Block a user