Compare commits

..

11 Commits
3.0.0 ... 3.0.3

Author SHA1 Message Date
David Molineus
88927a3de8 Change format of changelog and add semver note. 2018-09-18 10:33:32 +02:00
David Molineus
8fdc7dab29 Make alias generator services public for Contao 4.6/Symfony 4.0 compatibility. 2018-09-18 10:26:38 +02:00
David Molineus
9a1b6dee01 Merge tag '3.0.2' 2018-08-23 14:50:34 +02:00
David Molineus
9e0f11ec18 Prevent cacheKey is not set. 2018-08-23 14:48:58 +02:00
David Molineus
f60ed1b7be Fix changelog versions. 2018-08-23 14:36:46 +02:00
David Molineus
3d45f6b2eb Run composer require checker and solve issues. 2018-08-23 14:35:25 +02:00
David Molineus
e73a4d4bdf Merge tag '3.0.1' 2018-06-20 08:30:50 +02:00
David Molineus
0322a87e94 Fix license. 2018-06-20 08:30:14 +02:00
David Molineus
f5e8701312 Update readme. 2018-06-20 08:25:47 +02:00
David Molineus
2d0221a90a Fix broken filter factory (Close #57). 2018-06-20 08:24:22 +02:00
David Molineus
9f0b34a53b Merge tag '3.0.0' 2018-01-05 17:11:39 +01:00
32 changed files with 131 additions and 68 deletions

View File

@@ -0,0 +1,11 @@
{
"symbol-whitelist": [
"null", "true", "false",
"static", "self", "parent",
"array", "string", "int", "float", "bool", "iterable", "callable", "void", "object",
"array_insert",
"Contao\\ManagerPlugin\\Bundle\\BundlePluginInterface",
"Contao\\ManagerPlugin\\Bundle\\Config\\BundleConfig",
"Contao\\ManagerPlugin\\Bundle\\Parser\\ParserInterface"
]
}

View File

@@ -1,16 +1,38 @@
Changelog
=========
# Changelog
3.0.0 (2018-01-05)
------------------
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## 3.0.3 - 2018-09-18
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.2...3.0.3)
### Fixed
- Make alias generator services public for Contao 4.6/Symfony 4.0 compatibility.
## 3.0.2 - 2018-08-23
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.1...3.0.2)
- Run composer require checker and solve issues.
## 3.0.1 - 2018-06-20
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0...3.0.1)
- Fix broken dynamic bbox related data loading (#57)
## 3.0.0 - 2018-01-05
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-beta1...3.0.0)
- Make hook/dca listener services public
3.0.0-beta1 (2017-11-15)
------------------------
## 3.0.0-beta1 - 2017-11-15
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha2...3.0.0-beta1)
@@ -23,15 +45,9 @@ Bugfixes
- Broken service definitions
- Broken file layer id
3.0.0-alpha2
------------
## 3.0.0-alpha1 - 2017-10-19
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha2...2.0.0-alpha3)
3.0.0-alpha1 (2017-10-19)
------------------------
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha1...2.0.0-alpha2)
[Full Changelog](https://github.com/netzmacht/contao-leaflet-maps/compare/3.0.0-alpha1...3.0.0-alpha2)
Implemented enhancements

View File

@@ -7,7 +7,7 @@
"leaflet"
],
"type": "contao-bundle",
"license": "LGPL-3.0+",
"license": "LGPL-3.0-or-later",
"authors": [
{
"name": "David Molineus",
@@ -23,7 +23,17 @@
},
"require": {
"php": ">=7.0",
"ext-json": "*",
"ext-pdo": "*",
"contao/core-bundle": "~4.4",
"doctrine/dbal": "^2.5",
"symfony/config": "~3.3 || ~4.0",
"symfony/event-dispatcher": "~3.3 || ~4.0",
"symfony/dependency-injection": "~3.3 || ~4.0",
"symfony/filesystem": "~3.3 || ~4.0",
"symfony/http-kernel": "~3.3 || ~4.0",
"symfony/translation": "~3.3 || ~4.0",
"symfony/templating": "~3.3 || ~4.0",
"netzmacht/contao-leaflet-libraries": "^1.0",
"netzmacht/contao-leaflet-geocode-widget": "^1.2",
"netzmacht/php-javascript-builder": "^1.0",
@@ -35,7 +45,8 @@
},
"require-dev": {
"phpcq/all-tasks": "^1.2",
"contao/manager-plugin": "^2.1"
"contao/manager-plugin": "^2.1",
"phpstan/phpstan": "^0.10.3"
},
"autoload": {
"psr-4": {

View File

@@ -12,6 +12,8 @@
namespace Netzmacht\Contao\Leaflet\Backend;
use Contao\BackendTemplate;
/**
* Credits backend module.
*
@@ -26,7 +28,7 @@ class About
*/
public function generate()
{
$template = new \BackendTemplate('be_leaflet_about');
$template = new BackendTemplate('be_leaflet_about');
$template->headline = 'Leaftlet maps integration for Contao CMS';
$template->libraries = $this->getLibraries();
@@ -57,9 +59,8 @@ class About
if ($library['homepage']) {
$library['homepage'] = sprintf(
'<a href="%s" %s>%s</a>',
'<a href="%s" target="_blank">%s</a>',
$library['homepage'],
LINK_NEW_WINDOW,
preg_replace('#^(https?://(www)?)#i', '', $library['homepage'])
);
}

View File

@@ -74,11 +74,13 @@ services:
netzmacht.contao_leaflet.definition.alias_generator.factory_default:
class: Netzmacht\Contao\Leaflet\Alias\DefaultAliasGeneratorFactory
public: true
arguments:
- '@database_connection'
netzmacht.contao_leaflet.definition.alias_generator.factory_parent:
class: Netzmacht\Contao\Leaflet\Alias\ParentAliasGeneratorFactory
public: true
arguments:
- '@database_connection'

View File

@@ -21,7 +21,7 @@
</p>
</div>
<div class="right">
<a href="http://www.netzmacht.de" <?php echo LINK_NEW_WINDOW; ?>>
<a href="http://www.netzmacht.de" target="_blank">
<img src="bundles/netzmachtcontaoleaflet/img/logo.png"></a>
<p>
<strong class="company">netzmacht </strong><br>

View File

@@ -36,7 +36,7 @@ class BuildDefinitionEvent extends Event
/**
* The model.
*
* @var \Model
* @var Model
*/
private $model;
@@ -74,7 +74,7 @@ class BuildDefinitionEvent extends Event
/**
* Get the model.
*
* @return \Model
* @return Model
*/
public function getModel()
{

View File

@@ -51,7 +51,7 @@ final class FilterFactory
public function create(string $filter, string $values): Filter
{
if (isset($this->filters[$filter])) {
return call_user_func([$filter, 'fromRequest'], $values);
return call_user_func([$this->filters[$filter], 'fromRequest'], $values);
}
throw new \RuntimeException(sprintf('Creating filter failed. Unsupported filter "%s"', $filter));

View File

@@ -18,6 +18,7 @@ use Contao\Database\Result;
use Contao\Input;
use Contao\Model;
use Contao\Model\Collection;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\MapProvider;
use Netzmacht\Contao\Leaflet\Model\MapModel;
use Netzmacht\Contao\Toolkit\Component\Hybrid\AbstractHybrid;
@@ -127,8 +128,8 @@ abstract class AbstractMapHybrid extends AbstractHybrid
$data['mapId'] = $mapId;
$style = '';
$height = deserialize($this->get('leaflet_height'), true);
$width = deserialize($this->get('leaflet_width'), true);
$height = StringUtil::deserialize($this->get('leaflet_height'), true);
$width = StringUtil::deserialize($this->get('leaflet_width'), true);
if (!empty($width['value'])) {
$style .= 'width:' . $width['value'] . $width['unit'] . ';';

View File

@@ -12,6 +12,8 @@
namespace Netzmacht\Contao\Leaflet\Frontend;
use Contao\Config;
use Contao\Frontend;
use Netzmacht\Contao\Leaflet\Filter\Filter;
use Netzmacht\Contao\Leaflet\Mapper\Request;
@@ -72,7 +74,7 @@ class RequestUrl implements \JsonSerializable
$query .= '&amp;f=' . $filter->getName() . '&amp;v=' . $filter->toRequest();
}
$url = \Config::get('websitePath') . '/' . \Frontend::addToUrl($query, false);
$url = Config::get('websitePath') . '/' . Frontend::addToUrl($query, false);
return new static($url, $hash, $request);
}

View File

@@ -517,9 +517,9 @@ class LayerDcaListener extends AbstractListener
{
return sprintf(
'<a href="%s" title="%s">%s</a> ',
\Backend::addToUrl($href . '&amp;id=' . $row['id']),
Backend::addToUrl($href . '&amp;id=' . $row['id']),
$title,
\Image::getHtml($icon, $label, $attributes)
Image::getHtml($icon, $label, $attributes)
);
}
}

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Listener\Dca;
use Contao\Controller;
use Contao\StringUtil;
use Doctrine\DBAL\Connection;
use Netzmacht\Contao\Leaflet\Model\IconModel;
use Netzmacht\Contao\Leaflet\Model\PopupModel;
@@ -113,7 +114,7 @@ class MarkerDcaListener
'altitude' => null,
];
$values = trimsplit(',', $value);
$values = StringUtil::trimsplit(',', $value);
$keys = array_keys($combined);
$count = count($values);

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Listener\Dca;
use Contao\DataContainer;
use Contao\StringUtil;
use Netzmacht\Contao\Toolkit\Dca\Manager;
use Netzmacht\LeafletPHP\Value\LatLng;
use Symfony\Component\Translation\TranslatorInterface as Translator;
@@ -116,7 +117,7 @@ class Validator
*/
public function validateMultipleCoordinateSets($values, $dataContainer)
{
$sets = deserialize($values, true);
$sets = StringUtil::deserialize($values, true);
foreach ($sets as $lines) {
$this->validateMultipleCoordinates($lines, $dataContainer);
}

View File

@@ -16,6 +16,7 @@ namespace Netzmacht\Contao\Leaflet\Listener;
use Contao\FilesModel;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Event\ConvertToGeoJsonEvent;
use Netzmacht\Contao\Leaflet\Model\LayerModel;
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
@@ -117,7 +118,7 @@ final class GeoJsonListener
public function enrichObjects(GeoJsonObject $feature, LeafletDefinition $definition, $model)
{
if (($definition instanceof Marker || $definition instanceof Vector)
&& $model instanceof \Model && $feature instanceof Feature) {
&& $model instanceof Model && $feature instanceof Feature) {
$this->setDataProperty($model, $feature);
$this->setBoundsInformation($model, $feature);
}
@@ -148,7 +149,7 @@ final class GeoJsonListener
*/
public function setModelData(GeoJsonObject $feature, $model)
{
if (!$model instanceof \Model || !$feature instanceof Feature
if (!$model instanceof Model || !$feature instanceof Feature
|| empty($this->featureModelProperties[$model->getTable()])) {
return;
}
@@ -169,12 +170,12 @@ final class GeoJsonListener
/**
* Parse the model value based on the config.
*
* @param \Model $model The model.
* @param Model $model The model.
* @param mixed $property The property config.
*
* @return array|mixed|null
*/
private function parseModelValue(\Model $model, &$property)
private function parseModelValue(Model $model, &$property)
{
if (is_array($property)) {
list($property, $type) = $property;
@@ -183,7 +184,7 @@ final class GeoJsonListener
switch ($type) {
case 'array':
case 'object':
$value = deserialize($value, true);
$value = StringUtil::deserialize($value, true);
break;
case 'file':
@@ -194,7 +195,7 @@ final class GeoJsonListener
case 'files':
$repository = $this->repositoryManager->getRepository(FilesModel::class);
$collection = $repository->findMultipleByUuids(deserialize($value, true));
$collection = $repository->findMultipleByUuids(StringUtil::deserialize($value, true));
if ($collection) {
$value = $collection->fetchEach('path');

View File

@@ -12,6 +12,7 @@
namespace Netzmacht\Contao\Leaflet\Listener;
use Contao\Model;
use Netzmacht\Contao\Leaflet\Event\GetHashEvent;
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
@@ -46,7 +47,7 @@ class HashSubscriber implements EventSubscriberInterface
{
$data = $event->getData();
if ($data instanceof \Model) {
if ($data instanceof Model) {
$event->setHash($data->getTable() . '::' . $data->{$data->getPk()});
}
}

View File

@@ -14,6 +14,7 @@ declare(strict_types=1);
namespace Netzmacht\Contao\Leaflet\Listener;
use Contao\File;
use Netzmacht\Contao\Leaflet\Encoder\ContaoAssets;
use Netzmacht\Contao\Leaflet\Frontend\Assets\LibrariesConfiguration;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
@@ -117,7 +118,7 @@ class LoadAssetsListener
// TODO: Cache it.
// codingStandardsIgnoreEnd
$file = new \File('assets/leaflet/js/icons.js');
$file = new File('assets/leaflet/js/icons.js');
$file->write($buffer);
$file->close();

View File

@@ -206,7 +206,10 @@ class MapProvider
$model = $this->getModel($mapId);
}
if ($model->cache) {
$cacheKey = null;
$doCache = $model->cache;
if ($doCache) {
$cacheKey = $this->getCacheKey($mapId, $filter, $elementId, $template, $style);
if ($this->cache->contains($cacheKey)) {
@@ -219,7 +222,7 @@ class MapProvider
$buffer = $this->doGenerate($model, $filter, $elementId, $template, $style);
if ($model->cache) {
if ($doCache) {
$this->cache->save(
$cacheKey,
[

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\Control;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\Mapper\Request;
use Netzmacht\LeafletPHP\Definition;
@@ -68,7 +69,7 @@ class AttributionControlMapper extends AbstractControlMapper
$parent->setAttributionControl(false);
}
$attributions = deserialize($model->attributions, true);
$attributions = StringUtil::deserialize($model->attributions, true);
foreach ($attributions as $attribution) {
$definition->addAttribution($attribution);

View File

@@ -170,7 +170,7 @@ class MarkersLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
* @param Model $model The layer model.
* @param Request $request Optional building request.
*
* @return \Model\Collection|null
* @return \Contao\Model\Collection|null
*/
protected function loadMarkerModels(Model $model, Request $request = null)
{

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\Layer;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Definition\Layer\OverpassLayer;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\Mapper\Request;
@@ -146,7 +147,7 @@ class OverpassLayerMapper extends AbstractLayerMapper
*/
private function filterAmenityIconsConfig($amenityIconsConfig)
{
$amenityIconsConfig = deserialize($amenityIconsConfig, true);
$amenityIconsConfig = StringUtil::deserialize($amenityIconsConfig, true);
$amenityIconsMap = [];
foreach ($amenityIconsConfig as $config) {

View File

@@ -188,11 +188,11 @@ class VectorsLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
* Add javascript callbacks.
*
* @param GeoJson $definition The definition.
* @param \Model $model The database model.
* @param Model $model The database model.
*
* @return void
*/
protected function addCallbacks(GeoJson $definition, \Model $model)
protected function addCallbacks(GeoJson $definition, Model $model)
{
if ($model->pointToLayer) {
$definition->setPointToLayer(new Expression($model->pointToLayer));

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Model\ControlModel;
use Netzmacht\Contao\Leaflet\Model\MapModel;
use Netzmacht\Contao\Toolkit\Data\Model\RepositoryManager;
@@ -195,7 +196,7 @@ class MapMapper extends AbstractMapper
*/
private function buildBoundsCalculation(Map $map, MapModel $model)
{
$adjustBounds = deserialize($model->adjustBounds, true);
$adjustBounds = StringUtil::deserialize($model->adjustBounds, true);
if (in_array('deferred', $adjustBounds)) {
$map->setOption('adjustBounds', true);

View File

@@ -131,7 +131,7 @@ class OptionsBuilder
* Build options and conditional options.
*
* @param Definition $definition The definition being built.
* @param \Model $model The model.
* @param Model $model The model.
*
* @return $this
*/
@@ -147,7 +147,7 @@ class OptionsBuilder
* Build options.
*
* @param Definition $definition The definition being built.
* @param \Model $model The model.
* @param Model $model The model.
*
* @return void
*/
@@ -160,11 +160,11 @@ class OptionsBuilder
* Build conditional options.
*
* @param Definition $definition The definition being built.
* @param \Model $model The model.
* @param Model $model The model.
*
* @return void
*/
private function buildConditionals($definition, \Model $model)
private function buildConditionals($definition, Model $model)
{
foreach ($this->conditional as $column => $conditions) {
foreach ($conditions as $value => $options) {

View File

@@ -12,6 +12,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\Type;
use Contao\File;
use Contao\FilesModel;
use Contao\Model;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
@@ -118,7 +119,7 @@ class ImageIconMapper extends AbstractIconMapper
if ($file) {
$definition->setIconUrl($file->path);
$file = new \File($file->path);
$file = new File($file->path);
$definition->setIconSize([$file->width, $file->height]);
if (!$model->iconAnchor) {
@@ -162,7 +163,7 @@ class ImageIconMapper extends AbstractIconMapper
if ($file) {
$definition->setShadowUrl($file->path);
$file = new \File($file->path);
$file = new File($file->path);
$definition->setShadowSize([$file->width, $file->height]);
if (!$model->shadowAnchor) {

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\UI;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Mapper\AbstractMapper;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\Mapper\Request;
@@ -76,9 +77,9 @@ class PopupMapper extends AbstractMapper
if ($model->autoPan) {
$padding = array_map(
function ($value) {
return array_map('intval', trimsplit(',', $value));
return array_map('intval', StringUtil::trimsplit(',', $value));
},
deserialize($model->autoPanPadding, true)
StringUtil::deserialize($model->autoPanPadding, true)
);
if ($padding[0] === $padding[1]) {

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\Vector;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\Mapper\Request;
use Netzmacht\LeafletPHP\Definition;
@@ -67,7 +68,7 @@ class MultiPolylineMapper extends AbstractVectorMapper
*/
protected function createLatLngs(Polyline $definition, Model $model)
{
foreach (deserialize($model->multiData, true) as $ring => $data) {
foreach (StringUtil::deserialize($model->multiData, true) as $ring => $data) {
$latLngs = array_map(
function ($row) {
return LatLng::fromString($row);

View File

@@ -13,6 +13,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper\Vector;
use Contao\Model;
use Contao\StringUtil;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Netzmacht\Contao\Leaflet\Mapper\Request;
use Netzmacht\LeafletPHP\Definition\Vector\Rectangle;
@@ -53,7 +54,7 @@ class RectangleMapper extends AbstractVectorMapper
function ($latLng) {
return LatLng::fromString($latLng);
},
deserialize($model->bounds, true)
StringUtil::deserialize($model->bounds, true)
);
$arguments = parent::buildConstructArguments($model, $mapper, $request, $elementId);

View File

@@ -12,6 +12,7 @@
namespace Netzmacht\Contao\Leaflet\Model;
use Contao\Model;
use Contao\Model\Collection;
/**
@@ -19,7 +20,7 @@ use Contao\Model\Collection;
*
* @package Netzmacht\Contao\Leaflet\Model
*/
abstract class AbstractActiveModel extends \Model
abstract class AbstractActiveModel extends Model
{
/**
* Find an active model by its model id.

View File

@@ -12,7 +12,8 @@
namespace Netzmacht\Contao\Leaflet\Model;
use Model\Collection;
use Contao\Database;
use Contao\Model\Collection;
/**
* Class ControlModel for the tl_leaflet_vector table.
@@ -42,7 +43,7 @@ LEFT JOIN tl_leaflet_control_layer c ON l.id = c.lid
WHERE c.cid=?
SQL;
$result = \Database::getInstance()
$result = Database::getInstance()
->prepare($query)
->execute($this->id);
@@ -68,7 +69,7 @@ c ON l.id = c.lid
WHERE c.cid=? AND l.active=1
SQL;
$result = \Database::getInstance()
$result = Database::getInstance()
->prepare($query)
->execute($this->id);

View File

@@ -12,7 +12,7 @@
namespace Netzmacht\Contao\Leaflet\Model;
use Model\Collection;
use Contao\Model\Collection;
/**
* Class LayerModel for the tl_leaflet_layer table.

View File

@@ -12,7 +12,9 @@
namespace Netzmacht\Contao\Leaflet\Model;
use Model\Collection;
use Contao\Database;
use Contao\Model;
use Contao\Model\Collection;
/**
* Class MapModel for the tl_leaflet_map table.
@@ -22,7 +24,7 @@ use Model\Collection;
*
* @package Netzmacht\Contao\Leaflet\Model
*/
class MapModel extends \Model
class MapModel extends Model
{
/**
* Model table.
@@ -39,7 +41,7 @@ class MapModel extends \Model
public function findLayers()
{
$query = 'SELECT l.* FROM tl_leaflet_layer l LEFT JOIN tl_leaflet_map_layer m ON l.id = m.lid WHERE m.mid=?';
$result = \Database::getInstance()
$result = Database::getInstance()
->prepare($query)
->execute($this->id);
@@ -65,7 +67,7 @@ ON l.id = m.lid
WHERE m.mid=? AND l.active=1
SQL;
$result = \Database::getInstance()->prepare($query)->execute($this->id);
$result = Database::getInstance()->prepare($query)->execute($this->id);
if ($result->numRows) {
return Collection::createFromDbResult($result, 'tl_leaflet_layer');

View File

@@ -36,7 +36,7 @@ class MarkerModel extends AbstractActiveModel
* @param int $pid The parent id.
* @param Filter $filter The filter.
*
* @return \Model\Collection|null
* @return \Contao\Model\Collection|null
*/
public static function findByFilter($pid, Filter $filter = null)
{
@@ -59,7 +59,7 @@ class MarkerModel extends AbstractActiveModel
* @param int $pid The layer id.
* @param BboxFilter $filter The bbox filter.
*
* @return \Model\Collection|null
* @return \Contao\Model\Collection|null
*/
public static function findByBBoxFilter($pid, BboxFilter $filter)
{