Revize 03ccdd65
Přidáno uživatelem Jakub Vašta před asi 4 roky(ů)
website/src/Form/DataSetType.php | ||
---|---|---|
22 | 22 |
} |
23 | 23 |
|
24 | 24 |
public function buildForm(FormBuilderInterface $builder, array $options) { |
25 |
|
|
26 |
$selectTypeData = $options['data']->getDate() == null ? |
|
27 |
Utils::prepareDatasetsNames($this->manager->getAvailableCollections()) : |
|
28 |
$this->manager->getAvailableCollectionsByDay($options['data']->getDate()); |
|
29 |
|
|
25 | 30 |
$builder |
26 | 31 |
->add('date', TextType::class) |
27 | 32 |
->add('time', ChoiceType::class, [ |
... | ... | |
53 | 58 |
], |
54 | 59 |
]) |
55 | 60 |
->add('type', ChoiceType::class, [ |
56 |
'choices' => Utils::prepareDatasetsNames($this->manager->getAvailableCollections()),
|
|
61 |
'choices' => $selectTypeData,
|
|
57 | 62 |
]) |
58 | 63 |
->add('submit', SubmitType::class); |
59 | 64 |
} |
Také k dispozici: Unified diff
+ vyřešení bugu s vybíráním datové sady