mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-27 10:03:49 +00:00
Collection: amélioration + lancement d'événements
This commit is contained in:
@@ -23,6 +23,12 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
|
||||
/**
|
||||
* Available options :
|
||||
*
|
||||
* - `button_add_label`
|
||||
* - `button_remove_label`
|
||||
* - `identifier`: an identifier to identify the kind of collecton. Useful if some
|
||||
* javascript should be launched associated to `add_entry`, `remove_entry` events.
|
||||
*
|
||||
*
|
||||
* @author Julien Fastré <julien.fastre@champs-libres.coop>
|
||||
@@ -34,7 +40,8 @@ class ChillCollectionType extends AbstractType
|
||||
$resolver
|
||||
->setDefaults([
|
||||
'button_add_label' => 'Add an entry',
|
||||
'button_remove_label' => 'Remove entry'
|
||||
'button_remove_label' => 'Remove entry',
|
||||
'identifier' => ''
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -44,6 +51,7 @@ class ChillCollectionType extends AbstractType
|
||||
$view->vars['button_remove_label'] = $options['button_remove_label'];
|
||||
$view->vars['allow_delete'] = (int) $options['allow_delete'];
|
||||
$view->vars['allow_add'] = (int) $options['allow_add'];
|
||||
$view->vars['identifier'] = $options['identifier'];
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
|
Reference in New Issue
Block a user