forked from Snck3rs/contao-leaflet-maps
Replace string class names with the ::class attribute.
This commit is contained in:
@@ -31,7 +31,7 @@ class AttributionControlMapper extends AbstractControlMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Control\Attribution';
|
||||
protected static $definitionClass = Attribution::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Mapper\Control;
|
||||
|
||||
use Netzmacht\LeafletPHP\Plugins\FullScreen\FullScreenControl;
|
||||
|
||||
/**
|
||||
* Class FullscreenControlMapper.
|
||||
*
|
||||
@@ -24,7 +26,7 @@ class FullscreenControlMapper extends AbstractControlMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Plugins\FullScreen\FullScreenControl';
|
||||
protected static $definitionClass = FullScreenControl::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -16,6 +16,7 @@ use Contao\Model;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Model\ControlModel;
|
||||
use Netzmacht\Contao\Leaflet\Request\Request;
|
||||
use Netzmacht\LeafletPHP\Definition\Control\Layers;
|
||||
|
||||
/**
|
||||
* Class LayersControlMapper maps the control model to the layers control definition.
|
||||
@@ -29,7 +30,7 @@ class LayersControlMapper extends AbstractControlMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Control\Layers';
|
||||
protected static $definitionClass = Layers::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -41,10 +41,10 @@ class LoadingControlMapper extends AbstractControlMapper
|
||||
protected function getClassName(Model $model, DefinitionMapper $mapper, Request $request = null)
|
||||
{
|
||||
if ($model->spinjs) {
|
||||
return 'Netzmacht\LeafletPHP\Plugins\Loading\SpinJsLoadingControl';
|
||||
return SpinJsLoadingControl::class;
|
||||
}
|
||||
|
||||
return 'Netzmacht\LeafletPHP\Plugins\Loading\LoadingControl';
|
||||
return LoadingControl::class;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Mapper\Control;
|
||||
|
||||
use Netzmacht\LeafletPHP\Definition\Control\Scale;
|
||||
|
||||
/**
|
||||
* Class ScaleControlMapper maps the database item of the type "scale" to the scale control.
|
||||
*
|
||||
@@ -24,7 +26,7 @@ class ScaleControlMapper extends AbstractControlMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Control\Scale';
|
||||
protected static $definitionClass = Scale::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Mapper\Control;
|
||||
|
||||
use Netzmacht\LeafletPHP\Definition\Control\Zoom;
|
||||
|
||||
/**
|
||||
* Class ZoomControlMapper maps the zoom database definition to the zoom control.
|
||||
*
|
||||
@@ -24,7 +26,7 @@ class ZoomControlMapper extends AbstractControlMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Control\Zoom';
|
||||
protected static $definitionClass = Zoom::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -40,7 +40,7 @@ class MapMapper extends AbstractMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Map';
|
||||
protected static $definitionClass = Map::class;
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
|
||||
@@ -30,7 +30,7 @@ class DivIconMapper extends AbstractIconMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Type\DivIcon';
|
||||
protected static $definitionClass = DivIcon::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -17,6 +17,7 @@ use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Request\Request;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Definition\Type\DivIcon;
|
||||
use Netzmacht\LeafletPHP\Plugins\ExtraMarkers\ExtraMarkersIcon;
|
||||
|
||||
/**
|
||||
* Class DivIconMapper maps the icon model to the div icon definition.
|
||||
@@ -30,7 +31,7 @@ class ExtraMarkersIconMapper extends AbstractIconMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Plugins\ExtraMarkers\ExtraMarkersIcon';
|
||||
protected static $definitionClass = ExtraMarkersIcon::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -31,7 +31,7 @@ class ImageIconMapper extends AbstractIconMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Type\ImageIcon';
|
||||
protected static $definitionClass = ImageIcon::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -16,6 +16,7 @@ use Contao\Model;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Request\Request;
|
||||
use Netzmacht\LeafletPHP\Definition;
|
||||
use Netzmacht\LeafletPHP\Definition\Vector\Circle;
|
||||
use Netzmacht\LeafletPHP\Definition\Vector\CircleMarker;
|
||||
use Netzmacht\LeafletPHP\Value\LatLng;
|
||||
|
||||
@@ -31,7 +32,7 @@ class CircleMapper extends AbstractVectorMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Vector\Circle';
|
||||
protected static $definitionClass = Circle::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Mapper\Vector;
|
||||
|
||||
use Netzmacht\LeafletPHP\Definition\Vector\CircleMarker;
|
||||
|
||||
/**
|
||||
* Class CircleMarkerMapper maps the database model to the circle marker definition.
|
||||
*
|
||||
@@ -24,7 +26,7 @@ class CircleMarkerMapper extends CircleMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Vector\CircleMarker';
|
||||
protected static $definitionClass = CircleMarker::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -30,7 +30,7 @@ class MultiPolygonMapper extends MultiPolylineMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Vector\Polygon';
|
||||
protected static $definitionClass = Polygon::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -31,7 +31,7 @@ class MultiPolylineMapper extends AbstractVectorMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Vector\Polyline';
|
||||
protected static $definitionClass = Polyline::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Mapper\Vector;
|
||||
|
||||
use Netzmacht\LeafletPHP\Definition\Vector\Polygon;
|
||||
|
||||
/**
|
||||
* Class PolygonMapper maps the database model to the polygon definition.
|
||||
*
|
||||
@@ -24,7 +26,7 @@ class PolygonMapper extends PolylineMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Vector\Polygon';
|
||||
protected static $definitionClass = Polygon::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -31,7 +31,7 @@ class PolylineMapper extends AbstractVectorMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Vector\Polyline';
|
||||
protected static $definitionClass = Polyline::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace Netzmacht\Contao\Leaflet\Mapper\Vector;
|
||||
use Contao\Model;
|
||||
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
|
||||
use Netzmacht\Contao\Leaflet\Request\Request;
|
||||
use Netzmacht\LeafletPHP\Definition\Vector\Rectangle;
|
||||
use Netzmacht\LeafletPHP\Value\LatLng;
|
||||
use Netzmacht\LeafletPHP\Value\LatLngBounds;
|
||||
|
||||
@@ -30,7 +31,7 @@ class RectangleMapper extends AbstractVectorMapper
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
protected static $definitionClass = 'Netzmacht\LeafletPHP\Definition\Vector\Rectangle';
|
||||
protected static $definitionClass = Rectangle::class;
|
||||
|
||||
/**
|
||||
* Layer type.
|
||||
|
||||
Reference in New Issue
Block a user