Adjust dca files and callbacks to work with toolkit v2.

This commit is contained in:
David Molineus
2016-10-04 16:07:05 +02:00
parent 69e3ea8898
commit f8e28f3299
21 changed files with 290 additions and 142 deletions

View File

@@ -0,0 +1,37 @@
<?php
/**
* @package netzmacht
* @author David Molineus <david.molineus@netzmacht.de>
* @copyright 2016 netzmacht David Molineus. All rights reserved.
* @filesource
*
*/
namespace Netzmacht\Contao\Leaflet\Alias;
use Netzmacht\Contao\Toolkit\Data\Alias\Filter;
/**
* Class UnderscoreFilter
*
* @package Netzmacht\Contao\Leaflet\Alias
*/
class UnderscoreFilter extends Filter\AbstractFilter
{
/**
* {@inheritDoc}
*/
public function repeatUntilValid()
{
return false;
}
/**
* {@inheritDoc}
*/
public function apply($model, $value, $separator)
{
return str_replace('-', '_', $value);
}
}