Rename events and remove old ones.

This commit is contained in:
David Molineus
2017-10-06 15:50:34 +02:00
parent e8edeb8021
commit 31cd1c3ae4
7 changed files with 4 additions and 163 deletions

View File

@@ -23,7 +23,7 @@ use Symfony\Component\EventDispatcher\Event;
*/
class BuildDefinitionEvent extends Event
{
const NAME = 'leaflet.mapper.definition';
const NAME = 'netzmacht.contao_leaflet.mapper.build_definition';
/**
* The leaflet object definition.

View File

@@ -23,7 +23,7 @@ use Symfony\Component\EventDispatcher\Event;
*/
class ConvertToGeoJsonEvent extends Event
{
const NAME = 'leaflet.mapper.convert-to-geojson';
const NAME = 'netzmacht.contao_leaflet.mapper.convert_to_geojson';
/**
* The definition.

View File

@@ -21,7 +21,7 @@ use Symfony\Component\EventDispatcher\Event;
*/
class GetHashEvent extends Event
{
const NAME = 'leaflet.get-hash';
const NAME = 'netzmacht.contao_leaflet.get_hash';
/**
* The data.

View File

@@ -22,7 +22,7 @@ use Symfony\Component\EventDispatcher\Event;
*/
class GetJavascriptEvent extends Event
{
const NAME = 'leaflet.service.get-javascript';
const NAME = 'netzmacht.contao_leaflet.get_javascript';
/**
* The generated javascript.

View File

@@ -1,53 +0,0 @@
<?php
/**
* Leaflet maps for Contao CMS.
*
* @package contao-leaflet-maps
* @author David Molineus <david.molineus@netzmacht.de>
* @copyright 2016-2017 netzmacht David Molineus. All rights reserved.
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
* @filesource
*/
namespace Netzmacht\Contao\Leaflet\Event;
use Netzmacht\Contao\Leaflet\Mapper\DefinitionMapper;
use Symfony\Component\EventDispatcher\Event;
/**
* Class InitializeDefinitionMapperEvent is emitted when the definition mapper is created.
*
* @package Netzmacht\Contao\Leaflet\Event
*/
class InitializeDefinitionMapperEvent extends Event
{
const NAME = 'leaflet.boot.initialize-definition-mapper';
/**
* The definitino mapper.
*
* @var DefinitionMapper
*/
private $definitionMapper;
/**
* Construct.
*
* @param DefinitionMapper $definitionMapper The definition mapper.
*/
public function __construct(DefinitionMapper $definitionMapper)
{
$this->definitionMapper = $definitionMapper;
}
/**
* Get the definition mapper.
*
* @return DefinitionMapper
*/
public function getDefinitionMapper()
{
return $this->definitionMapper;
}
}

View File

@@ -1,53 +0,0 @@
<?php
/**
* Leaflet maps for Contao CMS.
*
* @package contao-leaflet-maps
* @author David Molineus <david.molineus@netzmacht.de>
* @copyright 2016-2017 netzmacht David Molineus. All rights reserved.
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
* @filesource
*/
namespace Netzmacht\Contao\Leaflet\Event;
use Symfony\Component\EventDispatcher\Event;
use Symfony\Component\EventDispatcher\EventDispatcherInterface as EventDispatcher;
/**
* InitializeEventDispatcherEvent is emitted then the internal event dispatcher of the encoding system is initialized.
*
* @package Netzmacht\Contao\Leaflet\Event
*/
class InitializeEventDispatcherEvent extends Event
{
const NAME = 'leaflet.boot.initialize-event-dispatcher';
/**
* The event dispatcher.
*
* @var EventDispatcher
*/
private $eventDispatcher;
/**
* The event dispatcher.
*
* @param EventDispatcher $eventDispatcher The event dispatcher.
*/
public function __construct(EventDispatcher $eventDispatcher)
{
$this->eventDispatcher = $eventDispatcher;
}
/**
* Get the event dispatcher.
*
* @return EventDispatcher
*/
public function getEventDispatcher()
{
return $this->eventDispatcher;
}
}

View File

@@ -1,53 +0,0 @@
<?php
/**
* Leaflet maps for Contao CMS.
*
* @package contao-leaflet-maps
* @author David Molineus <david.molineus@netzmacht.de>
* @copyright 2016-2017 netzmacht David Molineus. All rights reserved.
* @license LGPL-3.0 https://github.com/netzmacht/contao-leaflet-maps/blob/master/LICENSE
* @filesource
*/
namespace Netzmacht\Contao\Leaflet\Event;
use Netzmacht\LeafletPHP\Leaflet;
use Symfony\Component\EventDispatcher\Event;
/**
* Class InitializeLeafletBuilderEvent is emitted when the leaflet builder is created.
*
* @package Netzmacht\Contao\Leaflet\Event
*/
class InitializeLeafletBuilderEvent extends Event
{
const NAME = 'leaflet.boot.initialize-leaflet-builder';
/**
* The leaflet builder.
*
* @var Leaflet
*/
private $builder;
/**
* Construct.
*
* @param Leaflet $builder The leaflet builder.
*/
public function __construct(Leaflet $builder)
{
$this->builder = $builder;
}
/**
* Get the builder.
*
* @return Leaflet
*/
public function getBuilder()
{
return $this->builder;
}
}