Add vector style management.

This commit is contained in:
David Molineus committed 2015-01-09 11:53:58 +01:00
1 parent 9c689b072d
commit 37851110b0
23 files changed
+955 -218

No files matched your search

@@ -12,10 +12,25 @@
namespace Netzmacht\Contao\Leaflet\Dca;
use Netzmacht\Contao\DevTools\Dca\Options\OptionsBuilder;
use Netzmacht\Contao\Leaflet\Model\StyleModel;
class Vector
{
public function generateRow($row)
{
return sprintf('%s <span class="tl_gray">[%s]</span>', $row['title'], $row['type']);
}
/**
* Get all styles.
*
* @return array
*/
public function getStyles()
{
$collection = StyleModel::findAll(array('order' => 'title'));
return OptionsBuilder::fromCollection($collection, 'id', 'title')->getOptions();
}
}