Ongoing development.

This commit is contained in:
David Molineus
2015-01-05 12:25:46 +01:00
parent 74a4d79aa0
commit be9060795d
25 changed files with 472 additions and 33 deletions

View File

@@ -11,6 +11,7 @@
namespace Netzmacht\Contao\Leaflet\Mapper;
use Netzmacht\Contao\Leaflet\Model\ControlModel;
use Netzmacht\Contao\Leaflet\Model\LayerModel;
use Netzmacht\Contao\Leaflet\Model\MapModel;
use Netzmacht\LeafletPHP\Definition;
@@ -93,6 +94,18 @@ class MapMapper extends AbstractMapper
*/
private function buildControls(Map $map, MapModel$model, DefinitionMapper $mapper)
{
$collection = ControlModel::findBy(
array('pid=?', 'active=1'),
array($model->id),
array('order' => 'sorting')
);
if ($collection) {
foreach ($collection as $control) {
$control = $mapper->handle($control);
$map->addControl($control);
}
}
}
/**