forked from Snck3rs/contao-leaflet-maps
Add marker sorting
This commit is contained in:
@@ -23,7 +23,7 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
|||||||
'sorting' => array
|
'sorting' => array
|
||||||
(
|
(
|
||||||
'mode' => 4,
|
'mode' => 4,
|
||||||
'fields' => array('title'),
|
'fields' => array('sorting'),
|
||||||
'flag' => 1,
|
'flag' => 1,
|
||||||
'headerFields' => array('title', 'type'),
|
'headerFields' => array('title', 'type'),
|
||||||
'child_record_callback' => array('Netzmacht\Contao\Leaflet\Dca\Marker', 'generateRow'),
|
'child_record_callback' => array('Netzmacht\Contao\Leaflet\Dca\Marker', 'generateRow'),
|
||||||
@@ -123,6 +123,10 @@ $GLOBALS['TL_DCA']['tl_leaflet_marker'] = array
|
|||||||
(
|
(
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||||
),
|
),
|
||||||
|
'sorting' => array
|
||||||
|
(
|
||||||
|
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||||
|
),
|
||||||
'pid' => array
|
'pid' => array
|
||||||
(
|
(
|
||||||
'sql' => "int(10) unsigned NOT NULL default '0'"
|
'sql' => "int(10) unsigned NOT NULL default '0'"
|
||||||
|
|||||||
@@ -107,7 +107,8 @@ class MarkersLayerMapper extends AbstractLayerMapper implements GeoJsonMapper
|
|||||||
{
|
{
|
||||||
$collection = MarkerModel::findBy(
|
$collection = MarkerModel::findBy(
|
||||||
array('active=1', 'pid=?'),
|
array('active=1', 'pid=?'),
|
||||||
array($model->id)
|
array($model->id),
|
||||||
|
array('order' => 'sorting')
|
||||||
);
|
);
|
||||||
|
|
||||||
return $collection;
|
return $collection;
|
||||||
|
|||||||
Reference in New Issue
Block a user