Improve the alias generator to create valid non numeric entries.

This commit is contained in:
David Molineus
2016-10-06 08:00:53 +02:00
parent 3e84260e79
commit bbd97ae47d
2 changed files with 64 additions and 1 deletions

View File

@@ -10,6 +10,7 @@
*/
use Interop\Container\ContainerInterface;
use Netzmacht\Contao\Leaflet\Alias\DefaultAliasFilter;
use Netzmacht\Contao\Leaflet\Boot;
use Netzmacht\Contao\Leaflet\ContaoAssets;
use Netzmacht\Contao\Leaflet\Dca\ControlCallbacks;
@@ -138,7 +139,8 @@ $container[LeafletServices::ALIAS_GENERATOR] = $container->share(
$filters = [
new ExistingAliasFilter(),
new SlugifyFilter($fields),
new SuffixFilter(false),
new DefaultAliasFilter($dataContainerName),
new SuffixFilter(),
];
$validator = new UniqueDatabaseValueValidator(