mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-02 13:03:43 +01:00
Add popup support.
This commit is contained in:
@@ -13,6 +13,7 @@ namespace Netzmacht\Contao\Leaflet\Dca;
|
||||
|
||||
use Netzmacht\Contao\DevTools\Dca\Options\OptionsBuilder;
|
||||
use Netzmacht\Contao\Leaflet\Model\IconModel;
|
||||
use Netzmacht\Contao\Leaflet\Model\PopupModel;
|
||||
|
||||
/**
|
||||
* Class Marker is the dca helper class for the tl_leaflet_marker dca.
|
||||
@@ -52,6 +53,19 @@ class Marker
|
||||
return $builder->getOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all popups.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getPopups()
|
||||
{
|
||||
$collection = PopupModel::findAll(array('order' => 'title'));
|
||||
$builder = OptionsBuilder::fromCollection($collection, 'id', 'title');
|
||||
|
||||
return $builder->getOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Save the coordinates.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user