-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathIssue149Form.php
More file actions
39 lines (33 loc) · 959 Bytes
/
Copy pathIssue149Form.php
File metadata and controls
39 lines (33 loc) · 959 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
namespace Craue\FormFlowBundle\Tests\IntegrationTestBundle\Form;
use Craue\FormFlowBundle\Tests\IntegrationTestBundle\Entity\Issue149SubData;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
/**
* @author Christian Raue <christian.raue@gmail.com>
* @copyright 2011-2015 Christian Raue
* @license http://opensource.org/licenses/mit-license.php MIT License
*/
class Issue149Form extends AbstractType {
/**
* {@inheritDoc}
*/
public function buildForm(FormBuilderInterface $builder, array $options) {
switch ($options['flow_step']) {
case 1:
$subForm = $builder->create('photo', 'form', array(
'data_class' => get_class(new Issue149SubData()),
));
$subForm->add('image', 'file');
$subForm->add('title');
$builder->add($subForm);
break;
}
}
/**
* {@inheritDoc}
*/
public function getName() {
return 'issue149';
}
}