forked from Snck3rs/contao-leaflet-maps
Ongoing development.
This commit is contained in:
@@ -16,4 +16,21 @@ class LayerModel extends \Model
|
||||
{
|
||||
protected static $strTable = 'tl_leaflet_layer';
|
||||
|
||||
public static function findMultipleByTypes(array $types, $options = array())
|
||||
{
|
||||
if (empty($types)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$options['column'] = array(
|
||||
sprintf(
|
||||
'type IN (%s)',
|
||||
substr(str_repeat('?,', count($types)), 0, -1)
|
||||
)
|
||||
);
|
||||
|
||||
$options['value'] = $types;
|
||||
|
||||
return static::find($options);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user