mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-02 13:03:43 +01:00
Replace insert tags and masked entities. (Fix #17)
This commit is contained in:
61
src/Netzmacht/Contao/Leaflet/ServiceContainer.php
Normal file
61
src/Netzmacht/Contao/Leaflet/ServiceContainer.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @package dev
|
||||
* @author David Molineus <david.molineus@netzmacht.de>
|
||||
* @copyright 2015 netzmacht creative David Molineus
|
||||
* @license LGPL 3.0
|
||||
* @filesource
|
||||
*
|
||||
*/
|
||||
|
||||
namespace Netzmacht\Contao\Leaflet;
|
||||
|
||||
use Netzmacht\Contao\Leaflet\Frontend\ValueFilter;
|
||||
|
||||
/**
|
||||
* Class ServiceContainer
|
||||
*
|
||||
* @package Netzmacht\Contao\Leaflet
|
||||
*/
|
||||
class ServiceContainer
|
||||
{
|
||||
/**
|
||||
* The global service container.
|
||||
*
|
||||
* @var \Pimple
|
||||
*/
|
||||
private $container;
|
||||
|
||||
/**
|
||||
* Construct.
|
||||
*
|
||||
* @param \Pimple $container The global service container.
|
||||
*/
|
||||
public function __construct(\Pimple $container)
|
||||
{
|
||||
$this->container = $container;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the value filter service.
|
||||
*
|
||||
* @return ValueFilter
|
||||
*/
|
||||
public function getFrontendValueFilter()
|
||||
{
|
||||
return $this->getService('leaflet.frontend.value-filter');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a service from the container.
|
||||
*
|
||||
* @param string $name The service name.
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function getService($name)
|
||||
{
|
||||
return $this->container[$name];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user