mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-30 12:03:44 +01:00
Deprecate ServiceContainerTrait::getService.
This commit is contained in:
@@ -37,7 +37,7 @@ class Control
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->database = static::getService('database.connection');
|
$this->database = static::getServiceContainer()->getDatabaseConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ class Layer
|
|||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->layers = &$GLOBALS['LEAFLET_LAYERS'];
|
$this->layers = &$GLOBALS['LEAFLET_LAYERS'];
|
||||||
$this->database = static::getService('database.connection');
|
$this->database = static::getServiceContainer()->getDatabaseConnection();
|
||||||
|
|
||||||
\Controller::loadLanguageFile('leaflet_layer');
|
\Controller::loadLanguageFile('leaflet_layer');
|
||||||
|
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ class Map
|
|||||||
*/
|
*/
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
$this->database = static::getService('database.connection');
|
$this->database = static::getServiceContainer()->getDatabaseConnection();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ class Hooks
|
|||||||
*/
|
*/
|
||||||
protected function getMapService()
|
protected function getMapService()
|
||||||
{
|
{
|
||||||
return static::getService('leaflet.map.service');
|
return static::getServiceContainer()->getService('leaflet.map.service');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -81,7 +81,7 @@ class Hooks
|
|||||||
|
|
||||||
return $mapService->generate($mapId, null, $mapId, $template, $style);
|
return $mapService->generate($mapId, null, $mapId, $template, $style);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
if (static::getService('config')->get('debugMode')) {
|
if (static::getServiceContainer()->getConfig()->get('debugMode')) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user