mirror of
https://github.com/netzmacht/contao-leaflet-maps.git
synced 2025-11-29 19:43:50 +01:00
Add accidentally removed getLayer callback.
This commit is contained in:
@@ -329,6 +329,22 @@ class LayerCallbacks extends Callbacks
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all layers except of the current layer.
|
||||
*
|
||||
* @param \DataContainer $dataContainer The dataContainer driver.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getLayers($dataContainer)
|
||||
{
|
||||
$collection = LayerModel::findBy('id !', $dataContainer->id);
|
||||
|
||||
return OptionsBuilder::fromCollection($collection, 'title')
|
||||
->asTree()
|
||||
->getOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a button.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user