Browse Source

thematic facultatif

develop
Charly 3 years ago
parent
commit
6a9912797d
4 changed files with 25 additions and 13 deletions
  1. +6
    -3
      Form/Dream/DreamType.php
  2. +6
    -4
      Form/ProjectBoost/ProjectBoostType.php
  3. +7
    -3
      Form/ProjectInspiring/ProjectInspiringType.php
  4. +6
    -3
      Form/Revolt/RevoltType.php

+ 6
- 3
Form/Dream/DreamType.php View File

new NotBlank(), new NotBlank(),
], ],
] ]
)
->add(
);
if ($options['thematic'] == true) {
$builder->add(
'thematic', 'thematic',
EntityType::class, EntityType::class,
[ [
] ]
] ]
); );
}
if ($options['context'] == "backend") { if ($options['context'] == "backend") {
$builder->add( $builder->add(
'subthematic', 'subthematic',
$resolver->setDefaults( $resolver->setDefaults(
[ [
'data_class' => $this->em->getEntityName(DreamInterface::class), 'data_class' => $this->em->getEntityName(DreamInterface::class),
'context' => 'backend'
'context' => 'backend',
'thematic' => true
] ]
); );
} }

+ 6
- 4
Form/ProjectBoost/ProjectBoostType.php View File

new NotBlank(), new NotBlank(),
], ],
] ]
)
->add(
);
if ($options['thematic'] == true) {
$builder->add(
'thematic', 'thematic',
EntityType::class, EntityType::class,
[ [
] ]
] ]
); );
}
if ($options['context'] == "backend") { if ($options['context'] == "backend") {
$builder->add( $builder->add(
'subthematic', 'subthematic',
$resolver->setDefaults( $resolver->setDefaults(
[ [
'data_class' => $this->em->getEntityName(ProjectBoostInterface::class), 'data_class' => $this->em->getEntityName(ProjectBoostInterface::class),
'context' => 'backend'
'context' => 'backend',
'thematic' => true,
] ]
); );
} }

+ 7
- 3
Form/ProjectInspiring/ProjectInspiringType.php View File

new NotBlank(), new NotBlank(),
], ],
] ]
)
->add(
);

if ($options['thematic'] == true) {
$builder->add(
'thematic', 'thematic',
EntityType::class, EntityType::class,
[ [
] ]
] ]
); );
}
if ($options['context'] == "backend") { if ($options['context'] == "backend") {
$builder->add( $builder->add(
'subthematic', 'subthematic',
$resolver->setDefaults( $resolver->setDefaults(
[ [
'data_class' => $this->em->getEntityName(ProjectInspiringInterface::class), 'data_class' => $this->em->getEntityName(ProjectInspiringInterface::class),
'context' => 'backend'
'context' => 'backend',
'thematic' => true
] ]
); );
} }

+ 6
- 3
Form/Revolt/RevoltType.php View File

new NotBlank(), new NotBlank(),
], ],
] ]
)
->add(
);
if ($options['thematic'] == true) {
$builder->add(
'thematic', 'thematic',
EntityType::class, EntityType::class,
[ [
] ]
] ]
); );
}
if ($options['context'] == "backend") { if ($options['context'] == "backend") {
$builder->add( $builder->add(
'subthematic', 'subthematic',
$resolver->setDefaults( $resolver->setDefaults(
[ [
'data_class' => $this->em->getEntityName(RevoltInterface::class), 'data_class' => $this->em->getEntityName(RevoltInterface::class),
'context' => 'backend'
'context' => 'backend',
'thematic' => true
] ]
); );
} }

Loading…
Cancel
Save