Ongoing development.

This commit is contained in:
David Molineus
2015-01-06 14:55:53 +01:00
parent dfb558b655
commit e9d1ec7081
32 changed files with 1050 additions and 95 deletions

View File

@@ -12,6 +12,7 @@
namespace Netzmacht\Contao\Leaflet\Event;
use Netzmacht\LeafletPHP\Definition;
use Netzmacht\LeafletPHP\Definition\Type\LatLngBounds;
use Symfony\Component\EventDispatcher\Event;
/**
@@ -37,16 +38,25 @@ class BuildDefinitionEvent extends Event
*/
private $model;
/**
* Optional bounds where elements should be in.
*
* @var LatLngBounds
*/
private $bounds;
/**
* Construct.
*
* @param Definition $definition The leaflet definition.
* @param \Model $model The definition model.
* @param Definition $definition The leaflet definition.
* @param \Model $model The definition model.
* @param LatLngBounds $bounds Optional bounds where elements should be in.
*/
public function __construct(Definition $definition, \Model $model)
public function __construct(Definition $definition, \Model $model, LatLngBounds $bounds = null)
{
$this->definition = $definition;
$this->model = $model;
$this->model = $model;
$this->bounds = $bounds;
}
/**
@@ -68,4 +78,14 @@ class BuildDefinitionEvent extends Event
{
return $this->model;
}
/**
* Get the bounds.
*
* @return LatLngBounds|null
*/
public function getBounds()
{
return $this->bounds;
}
}