mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-03 21:38:41 +01:00
Fix code style.
This commit is contained in:
@@ -23,7 +23,7 @@ use Netzmacht\LeafletPHP\Definition\Type\ImageIcon;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
/**
|
||||
* Class BootSubscriber
|
||||
* Class BootSubscriber provides handlers for leaflet boot process.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Subscriber
|
||||
*/
|
||||
@@ -111,6 +111,8 @@ class BootSubscriber implements EventSubscriberInterface
|
||||
* Load Contao leaflet assets.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
public function loadAssets()
|
||||
{
|
||||
@@ -123,7 +125,9 @@ class BootSubscriber implements EventSubscriberInterface
|
||||
/**
|
||||
* Load icons.
|
||||
*
|
||||
* @throws \Netzmacht\Javascript\Exception\EncodeValueFailed
|
||||
* @return void
|
||||
*
|
||||
* @SuppressWarnings(PHPMD.Superglobals)
|
||||
*/
|
||||
public function loadIcons()
|
||||
{
|
||||
@@ -153,7 +157,9 @@ class BootSubscriber implements EventSubscriberInterface
|
||||
$file->write($buffer);
|
||||
$file->close();
|
||||
|
||||
// @codingStandardsIgnoreStart
|
||||
// TODO: Cache it.
|
||||
// codingStandardsIgnoreEnd
|
||||
$GLOBALS['TL_JAVASCRIPT'][] = 'assets/leaflet/js/icons.js' . (\Config::get('debugMode')
|
||||
? ''
|
||||
: '|static'
|
||||
|
||||
@@ -77,6 +77,13 @@ class EncoderSubscriber implements EventSubscriberInterface
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Force that icons are encoded as reference to the ContaoLeaflet icon registry.
|
||||
*
|
||||
* @param EncodeValueEvent $event The subscribed event.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function encodeIcons(EncodeValueEvent $event)
|
||||
{
|
||||
$value = $event->getValue();
|
||||
|
||||
@@ -11,10 +11,14 @@
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet\Subscriber;
|
||||
|
||||
|
||||
use Netzmacht\Contao\Leaflet\Event\GetHashEvent;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
/**
|
||||
* Class HashSubscriber creates hashes for models and for data which does not have a hash created by other subscribers.
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet\Subscriber
|
||||
*/
|
||||
class HashSubscriber implements EventSubscriberInterface
|
||||
{
|
||||
/**
|
||||
@@ -33,7 +37,9 @@ class HashSubscriber implements EventSubscriberInterface
|
||||
/**
|
||||
* Get hash for a model object.
|
||||
*
|
||||
* @param GetHashEvent $event
|
||||
* @param GetHashEvent $event The subscribed event.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function getModelHash(GetHashEvent $event)
|
||||
{
|
||||
@@ -47,7 +53,9 @@ class HashSubscriber implements EventSubscriberInterface
|
||||
/**
|
||||
* Get hash fallback if no hash was created so far.
|
||||
*
|
||||
* @param GetHashEvent $event
|
||||
* @param GetHashEvent $event The subscribed event.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function getFallback(GetHashEvent $event)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user