-
Notifications
You must be signed in to change notification settings - Fork 126
Expand file tree
/
Copy pathCreateVehicleFlow.php
More file actions
44 lines (38 loc) · 978 Bytes
/
Copy pathCreateVehicleFlow.php
File metadata and controls
44 lines (38 loc) · 978 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
40
41
42
43
44
<?php
namespace Craue\FormFlowBundle\Tests\IntegrationTestBundle\Form;
use Craue\FormFlowBundle\Form\FormFlow;
use Craue\FormFlowBundle\Form\FormFlowInterface;
/**
* @author Christian Raue <christian.raue@gmail.com>
* @copyright 2011-2015 Christian Raue
* @license http://opensource.org/licenses/mit-license.php MIT License
*/
class CreateVehicleFlow extends FormFlow {
/**
* {@inheritDoc}
*/
public function getName() {
return 'createVehicle';
}
/**
* {@inheritDoc}
*/
protected function loadStepsConfig() {
return array(
array(
'label' => 'wheels',
'form_type' => 'createVehicle',
),
array(
'label' => 'engine',
'form_type' => 'createVehicle',
'skip' => function($estimatedCurrentStepNumber, FormFlowInterface $flow) {
return $estimatedCurrentStepNumber > 1 && !$flow->getFormData()->canHaveEngine();
},
),
array(
'label' => 'confirmation',
),
);
}
}