forked from Snck3rs/contao-leaflet-maps
Add accidentally removed getLayer callback.
This commit is contained in:
@@ -329,6 +329,22 @@ class LayerCallbacks extends Callbacks
|
|||||||
return $options;
|
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.
|
* Generate a button.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user