2014-12-29 16:19:43 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
2017-10-05 15:45:43 +02:00
|
|
|
* Leaflet maps for Contao CMS.
|
|
|
|
|
*
|
2016-10-11 10:40:15 +02:00
|
|
|
* @package contao-leaflet-maps
|
2014-12-29 16:19:43 +01:00
|
|
|
* @author David Molineus <david.molineus@netzmacht.de>
|
2017-10-05 15:45:43 +02:00
|
|
|
* @copyright 2016-2017 netzmacht David Molineus. All rights reserved.
|
|
|
|
|
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
|
2014-12-29 16:19:43 +01:00
|
|
|
* @filesource
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
namespace Netzmacht\Contao\Leaflet\Mapper;
|
|
|
|
|
|
2015-01-24 21:37:25 +01:00
|
|
|
use Netzmacht\Contao\Leaflet\Filter\Filter;
|
2015-01-08 22:56:23 +01:00
|
|
|
|
2015-01-12 19:03:29 +01:00
|
|
|
/**
|
|
|
|
|
* Class AbstractTypeMapper is the base mapper for tables containing different types of definitins.
|
|
|
|
|
*
|
|
|
|
|
* @package Netzmacht\Contao\Leaflet\Mapper
|
|
|
|
|
*/
|
2015-01-05 12:25:46 +01:00
|
|
|
abstract class AbstractTypeMapper extends AbstractMapper
|
2014-12-29 16:19:43 +01:00
|
|
|
{
|
2015-01-12 19:03:29 +01:00
|
|
|
/**
|
|
|
|
|
* The definition type.
|
|
|
|
|
*
|
|
|
|
|
* @var string
|
|
|
|
|
*/
|
2014-12-29 16:19:43 +01:00
|
|
|
protected static $type;
|
|
|
|
|
|
2015-01-12 19:03:29 +01:00
|
|
|
/**
|
|
|
|
|
* {@inheritdoc}
|
|
|
|
|
*/
|
2015-01-24 21:37:25 +01:00
|
|
|
public function match($model, Filter $filter = null)
|
2014-12-29 16:19:43 +01:00
|
|
|
{
|
|
|
|
|
return parent::match($model) && $model->type === static::$type;
|
|
|
|
|
}
|
|
|
|
|
}
|