mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-02 13:03:43 +01:00
Replace string class names with the ::class attribute.
This commit is contained in:
@@ -17,6 +17,7 @@ use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
use Netzmacht\Contao\Leaflet\Request\Request;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Definition\Group\FeatureGroup;
|
||||
use Netzmacht\LeafletPHP\Definition\Group\LayerGroup;
|
||||
use Netzmacht\LeafletPHP\Definition\Layer;
|
||||
|
||||
@@ -40,10 +41,10 @@ class GroupLayerMapper extends AbstractLayerMapper
|
||||
protected function getClassName(Model $model, DefinitionMapper $mapper, Request $request = null)
|
||||
{
|
||||
if ($model->groupType === 'feature') {
|
||||
return 'Netzmacht\LeafletPHP\Definition\Group\FeatureGroup';
|
||||
return FeatureGroup::class;
|
||||
}
|
||||
|
||||
return 'Netzmacht\LeafletPHP\Definition\Group\LayerGroup';
|
||||
return LayerGroup::class;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,7 +36,7 @@ class MarkerClusterLayerMapper extends AbstractLayerMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Plugins\MarkerCluster\MarkerClusterGroup';
|
||||
protected static $definitionClass = MarkerClusterGroup::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -20,6 +20,7 @@ use Netzmacht\Contao\Leaflet\Frontend\RequestUrl;
|
||||
use Netzmacht\Contao\Leaflet\Request\Request;
|
||||
use Netzmacht\JavascriptBuilder\Type\Expression;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Plugins\Omnivore\GeoJson as OmnivoreGeoJson;
|
||||
use Netzmacht\LeafletPHP\Value\GeoJson\FeatureCollection;
|
||||
use Netzmacht\LeafletPHP\Definition\Group\GeoJson;
|
||||
|
||||
@@ -43,10 +44,10 @@ class MarkersLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
|
||||
protected function getClassName(Model $model, DefinitionMapper $mapper, Request $request = null)
|
||||
{
|
||||
if ($model->deferred) {
|
||||
return 'Netzmacht\LeafletPHP\Plugins\Omnivore\GeoJson';
|
||||
return OmnivoreGeoJson::class;
|
||||
}
|
||||
|
||||
return 'Netzmacht\LeafletPHP\Definition\Group\GeoJson';
|
||||
return GeoJson::class;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -17,6 +17,7 @@ use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\OptionsBuilder;
|
||||
use Netzmacht\Contao\Leaflet\Request\Request;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Plugins\LeafletProviders\Provider;
|
||||
|
||||
/**
|
||||
* Class ProviderLayerMapper maps the layer model to the tile provider definition.
|
||||
@@ -60,7 +61,7 @@ class ProviderLayerMapper extends AbstractLayerMapper
|
||||
return $this->providers[$model->tile_provider]['class'];
|
||||
}
|
||||
|
||||
return 'Netzmacht\LeafletPHP\Plugins\LeafletProviders\Provider';
|
||||
return Provider::class;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -32,7 +32,7 @@ class TileLayerMapper extends AbstractLayerMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Raster\TileLayer';
|
||||
protected static $definitionClass = TileLayer::class;
|
||||
|
||||
/**
|
||||
* The layer type.
|
||||
|
||||
@@ -21,6 +21,7 @@ use Netzmacht\Contao\Leaflet\Frontend\RequestUrl;
|
||||
use Netzmacht\Contao\Leaflet\Request\Request;
|
||||
use Netzmacht\JavascriptBuilder\Type\Expression;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Plugins\Omnivore\GeoJson as OmnivoreGeoJson;
|
||||
use Netzmacht\LeafletPHP\Value\GeoJson\FeatureCollection;
|
||||
use Netzmacht\LeafletPHP\Definition\Group\GeoJson;
|
||||
|
||||
@@ -44,10 +45,10 @@ class VectorsLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
|
||||
protected function getClassName(Model $model, DefinitionMapper $mapper, Request $request = null)
|
||||
{
|
||||
if ($model->deferred) {
|
||||
return 'Netzmacht\LeafletPHP\Plugins\Omnivore\GeoJson';
|
||||
return OmnivoreGeoJson::class;
|
||||
}
|
||||
|
||||
return 'Netzmacht\LeafletPHP\Definition\Group\GeoJson';
|
||||
return GeoJson::class;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user