Files
contao-leaflet-maps/src/Netzmacht/Contao/Leaflet/Model/LayerModel.php

37 lines
737 B
PHP
Raw Normal View History

2014-12-29 16:22:16 +01:00
<?php
/**
* @package dev
* @author David Molineus <david.molineus@netzmacht.de>
* @copyright 2014 netzmacht creative David Molineus
* @license LGPL 3.0
* @filesource
*
*/
namespace Netzmacht\Contao\Leaflet\Model;
class LayerModel extends \Model
{
protected static $strTable = 'tl_leaflet_layer';
2015-01-06 14:55:53 +01:00
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);
}
2014-12-29 16:22:16 +01:00
}