Replace string class names with the ::class attribute.

This commit is contained in:
David Molineus
2017-10-17 13:51:09 +02:00
parent c2fd00e6a0
commit 59df74c3f9
23 changed files with 45 additions and 27 deletions

View File

@@ -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;
}
/**