diff --git a/.composer-require-checker.json b/.composer-require-checker.json new file mode 100644 index 0000000..9efb696 --- /dev/null +++ b/.composer-require-checker.json @@ -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" + ] +} diff --git a/CHANGELOG.md b/CHANGELOG.md index 998944f..379b456 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,14 @@ Changelog ========= -3.0.1 (2018-xx-xx) +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) diff --git a/composer.json b/composer.json index b83b7a2..aa9638a 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/Backend/About.php b/src/Backend/About.php index 50c9e13..5678f3a 100644 --- a/src/Backend/About.php +++ b/src/Backend/About.php @@ -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( - '%s', + '%s', $library['homepage'], - LINK_NEW_WINDOW, preg_replace('#^(https?://(www)?)#i', '', $library['homepage']) ); } diff --git a/src/Bundle/Resources/contao/templates/be_leaflet_about.html5 b/src/Bundle/Resources/contao/templates/be_leaflet_about.html5 index dfa1178..15835f2 100644 --- a/src/Bundle/Resources/contao/templates/be_leaflet_about.html5 +++ b/src/Bundle/Resources/contao/templates/be_leaflet_about.html5 @@ -21,7 +21,7 @@

- > +

netzmacht
diff --git a/src/Event/BuildDefinitionEvent.php b/src/Event/BuildDefinitionEvent.php index e0aa7f3..66e5abf 100644 --- a/src/Event/BuildDefinitionEvent.php +++ b/src/Event/BuildDefinitionEvent.php @@ -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() { diff --git a/src/Frontend/AbstractMapHybrid.php b/src/Frontend/AbstractMapHybrid.php index 71d23b1..b31c29d 100644 --- a/src/Frontend/AbstractMapHybrid.php +++ b/src/Frontend/AbstractMapHybrid.php @@ -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'] . ';'; diff --git a/src/Frontend/RequestUrl.php b/src/Frontend/RequestUrl.php index 8603a9d..df7de63 100644 --- a/src/Frontend/RequestUrl.php +++ b/src/Frontend/RequestUrl.php @@ -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 .= '&f=' . $filter->getName() . '&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); } diff --git a/src/Listener/Dca/LayerDcaListener.php b/src/Listener/Dca/LayerDcaListener.php index b0a8fde..120de1e 100644 --- a/src/Listener/Dca/LayerDcaListener.php +++ b/src/Listener/Dca/LayerDcaListener.php @@ -517,9 +517,9 @@ class LayerDcaListener extends AbstractListener { return sprintf( '%s ', - \Backend::addToUrl($href . '&id=' . $row['id']), + Backend::addToUrl($href . '&id=' . $row['id']), $title, - \Image::getHtml($icon, $label, $attributes) + Image::getHtml($icon, $label, $attributes) ); } } diff --git a/src/Listener/Dca/MarkerDcaListener.php b/src/Listener/Dca/MarkerDcaListener.php index 916f7fa..741657c 100644 --- a/src/Listener/Dca/MarkerDcaListener.php +++ b/src/Listener/Dca/MarkerDcaListener.php @@ -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); diff --git a/src/Listener/Dca/Validator.php b/src/Listener/Dca/Validator.php index 89ad56e..e05fd5c 100644 --- a/src/Listener/Dca/Validator.php +++ b/src/Listener/Dca/Validator.php @@ -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); } diff --git a/src/Listener/GeoJsonListener.php b/src/Listener/GeoJsonListener.php index 4c64914..4f5702f 100644 --- a/src/Listener/GeoJsonListener.php +++ b/src/Listener/GeoJsonListener.php @@ -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 mixed $property The property config. + * @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'); diff --git a/src/Listener/HashSubscriber.php b/src/Listener/HashSubscriber.php index ba375c0..b3f27be 100644 --- a/src/Listener/HashSubscriber.php +++ b/src/Listener/HashSubscriber.php @@ -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()}); } } diff --git a/src/Listener/LoadAssetsListener.php b/src/Listener/LoadAssetsListener.php index 79715f8..e6954c8 100644 --- a/src/Listener/LoadAssetsListener.php +++ b/src/Listener/LoadAssetsListener.php @@ -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(); diff --git a/src/Mapper/Control/AttributionControlMapper.php b/src/Mapper/Control/AttributionControlMapper.php index c06f0a0..d6991d2 100644 --- a/src/Mapper/Control/AttributionControlMapper.php +++ b/src/Mapper/Control/AttributionControlMapper.php @@ -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); diff --git a/src/Mapper/Layer/MarkersLayerMapper.php b/src/Mapper/Layer/MarkersLayerMapper.php index e402bac..017e7e8 100644 --- a/src/Mapper/Layer/MarkersLayerMapper.php +++ b/src/Mapper/Layer/MarkersLayerMapper.php @@ -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) { diff --git a/src/Mapper/Layer/OverpassLayerMapper.php b/src/Mapper/Layer/OverpassLayerMapper.php index a2a8743..14ba514 100644 --- a/src/Mapper/Layer/OverpassLayerMapper.php +++ b/src/Mapper/Layer/OverpassLayerMapper.php @@ -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) { diff --git a/src/Mapper/Layer/VectorsLayerMapper.php b/src/Mapper/Layer/VectorsLayerMapper.php index bd587d3..e5c7c97 100644 --- a/src/Mapper/Layer/VectorsLayerMapper.php +++ b/src/Mapper/Layer/VectorsLayerMapper.php @@ -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)); diff --git a/src/Mapper/MapMapper.php b/src/Mapper/MapMapper.php index 441ad8d..da1ba02 100644 --- a/src/Mapper/MapMapper.php +++ b/src/Mapper/MapMapper.php @@ -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); diff --git a/src/Mapper/OptionsBuilder.php b/src/Mapper/OptionsBuilder.php index c6b307b..4d46d3c 100644 --- a/src/Mapper/OptionsBuilder.php +++ b/src/Mapper/OptionsBuilder.php @@ -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) { diff --git a/src/Mapper/Type/ImageIconMapper.php b/src/Mapper/Type/ImageIconMapper.php index a846217..b92e8df 100644 --- a/src/Mapper/Type/ImageIconMapper.php +++ b/src/Mapper/Type/ImageIconMapper.php @@ -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) { diff --git a/src/Mapper/UI/PopupMapper.php b/src/Mapper/UI/PopupMapper.php index 24e1778..2d39110 100644 --- a/src/Mapper/UI/PopupMapper.php +++ b/src/Mapper/UI/PopupMapper.php @@ -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]) { diff --git a/src/Mapper/Vector/MultiPolylineMapper.php b/src/Mapper/Vector/MultiPolylineMapper.php index 5147ccf..de62aac 100644 --- a/src/Mapper/Vector/MultiPolylineMapper.php +++ b/src/Mapper/Vector/MultiPolylineMapper.php @@ -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); diff --git a/src/Mapper/Vector/RectangleMapper.php b/src/Mapper/Vector/RectangleMapper.php index 13307d4..2ead6a2 100644 --- a/src/Mapper/Vector/RectangleMapper.php +++ b/src/Mapper/Vector/RectangleMapper.php @@ -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); diff --git a/src/Model/AbstractActiveModel.php b/src/Model/AbstractActiveModel.php index c1b39cf..038f96e 100644 --- a/src/Model/AbstractActiveModel.php +++ b/src/Model/AbstractActiveModel.php @@ -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. diff --git a/src/Model/ControlModel.php b/src/Model/ControlModel.php index 0dd623b..367c0eb 100644 --- a/src/Model/ControlModel.php +++ b/src/Model/ControlModel.php @@ -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); diff --git a/src/Model/LayerModel.php b/src/Model/LayerModel.php index 7164d09..483e125 100644 --- a/src/Model/LayerModel.php +++ b/src/Model/LayerModel.php @@ -12,7 +12,7 @@ namespace Netzmacht\Contao\Leaflet\Model; -use Model\Collection; +use Contao\Model\Collection; /** * Class LayerModel for the tl_leaflet_layer table. diff --git a/src/Model/MapModel.php b/src/Model/MapModel.php index 8b9baf7..970cd74 100644 --- a/src/Model/MapModel.php +++ b/src/Model/MapModel.php @@ -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'); diff --git a/src/Model/MarkerModel.php b/src/Model/MarkerModel.php index 860bdd2..b42ca32 100644 --- a/src/Model/MarkerModel.php +++ b/src/Model/MarkerModel.php @@ -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) {