1 | <?php |
||
22 | class Substep extends AbstractFormDefinition implements DataPreProcessorInterface |
||
23 | { |
||
24 | /** |
||
25 | * @var string |
||
26 | * @validate NotEmpty |
||
27 | */ |
||
28 | protected $identifier; |
||
29 | |||
30 | /** |
||
31 | * @var \Romm\Formz\Form\Definition\Step\Step\SupportedField[] |
||
32 | * @validate NotEmpty |
||
33 | */ |
||
34 | protected $supportedFields; |
||
35 | |||
36 | /** |
||
37 | * @param string $identifier |
||
38 | */ |
||
39 | public function __construct($identifier) |
||
43 | |||
44 | /** |
||
45 | * @return string |
||
46 | */ |
||
47 | public function getIdentifier() |
||
51 | |||
52 | /** |
||
53 | * @return SupportedField[] |
||
54 | */ |
||
55 | public function getSupportedFields() |
||
59 | |||
60 | /** |
||
61 | * @param Field $field |
||
62 | * @return bool |
||
63 | */ |
||
64 | public function supportsField(Field $field) |
||
74 | |||
75 | /** |
||
76 | * This function will parse the configuration for `supportedFields`: instead |
||
77 | * of being forced to fill the `fieldName` option for each entry, the field |
||
78 | * key of the entry can be the actual name of the field, and the value of |
||
79 | * the entry can be anything but an array. |
||
80 | * |
||
81 | * @param DataPreProcessor $processor |
||
82 | */ |
||
83 | public static function dataPreProcessor(DataPreProcessor $processor) |
||
104 | } |
||
105 |