Add more controls.

This commit is contained in:
David Molineus
2015-01-05 14:58:37 +01:00
parent be9060795d
commit c00d08c872
8 changed files with 173 additions and 5 deletions

View File

@@ -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;
}
}