|
|
@@ -11,6 +11,7 @@ use Lc\PietroBundle\Form\Dream\DreamType; |
|
|
|
use Lc\PietroBundle\Form\ProjectBoost\ProjectBoostType; |
|
|
|
use Lc\PietroBundle\Form\ProjectInspiring\ProjectInspiringType; |
|
|
|
use Lc\PietroBundle\Form\Revolt\RevoltType; |
|
|
|
use Lc\PietroBundle\Repository\Territory\TerritoryStore; |
|
|
|
use Lc\SovBundle\Definition\Field\AbstractFieldDefinition; |
|
|
|
use Lc\SovBundle\Field\CollectionField; |
|
|
|
use Lc\SovBundle\Field\StatusField; |
|
|
@@ -21,10 +22,12 @@ class IndividualDataFieldDefinition extends AbstractFieldDefinition |
|
|
|
{ |
|
|
|
|
|
|
|
protected AuthorizationCheckerInterface $authorizationChecker; |
|
|
|
protected TerritoryStore $territoryStore; |
|
|
|
|
|
|
|
public function __construct(TranslatorAdmin $translatorAdmin, AuthorizationCheckerInterface $authorizationChecker) |
|
|
|
public function __construct(TranslatorAdmin $translatorAdmin, AuthorizationCheckerInterface $authorizationChecker, TerritoryStore $territoryStore) |
|
|
|
{ |
|
|
|
$this->authorizationChecker = $authorizationChecker; |
|
|
|
$this->territoryStore = $territoryStore; |
|
|
|
|
|
|
|
parent::__construct($translatorAdmin); |
|
|
|
} |
|
|
@@ -46,10 +49,12 @@ class IndividualDataFieldDefinition extends AbstractFieldDefinition |
|
|
|
{ |
|
|
|
$fields = array(); |
|
|
|
|
|
|
|
$territoryArray = $this->territoryStore->get(); |
|
|
|
|
|
|
|
$fields['firstname'] = TextField::new('firstname'); |
|
|
|
$fields['lastname'] = TextField::new('lastname'); |
|
|
|
$fields['email'] = EmailField::new('email'); |
|
|
|
$fields['territory'] = AssociationField::new('territory'); |
|
|
|
$fields['territory'] = AssociationField::new('territory')->setFormTypeOption('choices', $territoryArray); |
|
|
|
$fields['nbDream'] = TextField::new('nbDream'); |
|
|
|
$fields['nbRevolt'] = TextField::new('nbRevolt'); |
|
|
|
$fields['nbProjectBoost'] = TextField::new('nbProjectBoost'); |