Replace old alias generator callback definition with toolkit 3.0 compatible ones.

This commit is contained in:
David Molineus
2017-10-06 14:14:39 +02:00
parent ad5e30fd09
commit ad6a4e9384
8 changed files with 56 additions and 48 deletions

View File

@@ -258,15 +258,16 @@ $GLOBALS['TL_DCA']['tl_leaflet_layer'] = [
'inputType' => 'text',
'search' => true,
'save_callback' => [
\Netzmacht\Contao\Toolkit\Dca\Callback\CallbackFactory::aliasGenerator(
'tl_leaflet_layer',
'alias',
['title'],
\Netzmacht\Contao\Leaflet\DependencyInjection\LeafletServices::ALIAS_GENERATOR
),
['netzmacht.contao_toolkit.dca.listeners.alias_generator', 'handleSaveCallback'],
['netzmacht.contao_leaflet_maps.listeners.dca.validator', 'validateAlias'],
],
'eval' => ['mandatory' => false, 'maxlength' => 255, 'tl_class' => 'w50', 'unique' => true],
'toolkit' => [
'alias_generator' => [
'factory' => 'netzmacht.contao_leaflet_maps.definition.alias_generator.factory_default',
'fields' => ['title']
],
],
'sql' => 'varchar(255) NULL',
],
'type' => [