Allow to select sub layers in the control.

This commit is contained in:
David Molineus
2016-10-05 09:45:03 +02:00
parent 98ef670e4a
commit 5da4c047b0

View File

@@ -81,16 +81,11 @@ class ControlCallbacks extends Callbacks
*/ */
public function getLayers() public function getLayers()
{ {
$options = array(); $collection = LayerModel::findAll();
$collection = LayerModel::findBy('pid', '0', array('order' => 'title'));
if ($collection) { return OptionsBuilder::fromCollection($collection, 'title')
foreach ($collection as $model) { ->asTree()
$options[$model->id] = $model->title; ->getOptions();
}
}
return $options;
} }
/** /**