Add accidentally removed getLayer callback.

This commit is contained in:
David Molineus
2016-10-05 14:11:25 +02:00
parent 91000979eb
commit e574aa36a0

View File

@@ -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.
*