Rename listener namespace.

This commit is contained in:
David Molineus
2017-10-06 13:19:46 +02:00
parent fde6c2b4c7
commit 1fc47f705d
4 changed files with 7 additions and 14 deletions

View File

@@ -10,9 +10,9 @@
* @filesource * @filesource
*/ */
namespace Netzmacht\Contao\Leaflet\Dca; namespace Netzmacht\Contao\Leaflet\Listener\Dca;
use Netzmacht\Contao\Toolkit\Dca\Callback\Callbacks; use Netzmacht\Contao\Toolkit\Dca\Listener\AbstractListener;
use Netzmacht\Contao\Toolkit\Dca\Manager; use Netzmacht\Contao\Toolkit\Dca\Manager;
use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder; use Netzmacht\Contao\Toolkit\Dca\Options\OptionsBuilder;
use Netzmacht\Contao\Leaflet\Model\LayerModel; use Netzmacht\Contao\Leaflet\Model\LayerModel;
@@ -23,7 +23,7 @@ use Symfony\Component\Translation\TranslatorInterface as Translator;
* *
* @package Netzmacht\Contao\Leaflet\Dca * @package Netzmacht\Contao\Leaflet\Dca
*/ */
class LayerCallbacks extends Callbacks class LayerDcaListener extends AbstractListener
{ {
/** /**
* Name of the data container. * Name of the data container.
@@ -32,13 +32,6 @@ class LayerCallbacks extends Callbacks
*/ */
protected static $name = 'tl_leaflet_layer'; protected static $name = 'tl_leaflet_layer';
/**
* Helper service name.
*
* @var string
*/
protected static $serviceName = 'leaflet.dca.layer-callbacks';
/** /**
* Layers definition. * Layers definition.
* *

View File

@@ -12,7 +12,7 @@
declare(strict_types=1); declare(strict_types=1);
namespace Netzmacht\Contao\Leaflet\Listeners\Dca; namespace Netzmacht\Contao\Leaflet\Listener\Dca;
use Contao\DataContainer; use Contao\DataContainer;
use Doctrine\DBAL\Connection; use Doctrine\DBAL\Connection;

View File

@@ -1,12 +1,12 @@
services: services:
netzmacht.contao_leaflet_maps.listeners.dca.map: netzmacht.contao_leaflet_maps.listeners.dca.map:
class: Netzmacht\Contao\Leaflet\Listeners\Dca\MapDcaListener class: Netzmacht\Contao\Leaflet\Listener\Dca\MapDcaListener
arguments: arguments:
- '@netzmacht.contao_toolkit.dca.manager' - '@netzmacht.contao_toolkit.dca.manager'
- '@database_connection' - '@database_connection'
netzmacht.contao_leaflet_maps.listeners.dca.control: netzmacht.contao_leaflet_maps.listeners.dca.control:
class: Netzmacht\Contao\Leaflet\Listeners\Dca\ControlDcaListener class: Netzmacht\Contao\Leaflet\Listener\Dca\ControlDcaListener
arguments: arguments:
- '@netzmacht.contao_toolkit.dca.manager' - '@netzmacht.contao_toolkit.dca.manager'
- '@database_connection' - '@database_connection'

View File

@@ -301,7 +301,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_control'] = array
'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'], 'label' => &$GLOBALS['TL_LANG']['tl_leaflet_control']['layer'],
'exclude' => true, 'exclude' => true,
'inputType' => 'select', 'inputType' => 'select',
'options_callback' => \Netzmacht\Contao\Leaflet\Listeners\Dca\ControlDcaListener::callback('getLayers'), 'options_callback' => \Netzmacht\Contao\Leaflet\Listener\Dca\ControlDcaListener::callback('getLayers'),
'eval' => array( 'eval' => array(
'style' => 'width: 300px', 'style' => 'width: 300px',
'chosen' => true, 'chosen' => true,