mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-12-02 21:14:15 +01:00
Add more controls.
This commit is contained in:
@@ -12,6 +12,8 @@
|
||||
namespace Netzmacht\Contao\Leaflet\Dca;
|
||||
|
||||
|
||||
use Netzmacht\Contao\Leaflet\Model\LayerModel;
|
||||
|
||||
class Control
|
||||
{
|
||||
public function generateRow($row)
|
||||
@@ -22,4 +24,18 @@ class Control
|
||||
$row['type']
|
||||
);
|
||||
}
|
||||
|
||||
public function getLayers()
|
||||
{
|
||||
$options = array();
|
||||
$collection = LayerModel::findBy('pid', '0', array('order' => 'title'));
|
||||
|
||||
if ($collection) {
|
||||
foreach ($collection as $model) {
|
||||
$options[$model->id] = $model->title;
|
||||
}
|
||||
}
|
||||
|
||||
return $options;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user