mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-03 05:23:49 +01:00
Make mapper interface independent from Contao models.
This commit is contained in:
@@ -15,7 +15,9 @@ use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
|
||||
|
||||
/**
|
||||
* Class AbstractMapper.
|
||||
* Class AbstractMapper is made for mapping Contao models to the definition.
|
||||
*
|
||||
* For custom sources besides Contao models use your own implementation of the mapper interface.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Mapper
|
||||
*/
|
||||
@@ -149,7 +151,7 @@ abstract class AbstractMapper implements Mapper
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function handle(\Model $model, DefinitionMapper $mapper, LatLngBounds $bounds = null)
|
||||
public function handle($model, DefinitionMapper $mapper, LatLngBounds $bounds = null)
|
||||
{
|
||||
$definition = $this->createInstance($model, $mapper, $bounds);
|
||||
|
||||
@@ -163,7 +165,7 @@ abstract class AbstractMapper implements Mapper
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function match(\Model $model)
|
||||
public function match($model, LatLngBounds $bounds = null)
|
||||
{
|
||||
$modelClass = static::$modelClass;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user