Add popup support.

This commit is contained in:
David Molineus
2015-01-27 17:14:58 +01:00
parent 126b84f524
commit c9c2bd3cce
19 changed files with 597 additions and 5 deletions

View File

@@ -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.
*