|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* MIT License |
|
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace SprykerEco\Yves\Payone\Form; |
|
9
|
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\PaymentTransfer; |
|
|
|
|
|
|
11
|
|
|
use Generated\Shared\Transfer\PayonePaymentTransfer; |
|
|
|
|
|
|
12
|
|
|
use Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface; |
|
13
|
|
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType; |
|
14
|
|
|
use Symfony\Component\Form\FormBuilderInterface; |
|
15
|
|
|
use Symfony\Component\OptionsResolver\OptionsResolver; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* @method \SprykerEco\Yves\Payone\PayoneConfig getConfig() |
|
19
|
|
|
*/ |
|
20
|
|
|
class SecurityInvoiceSubForm extends AbstractPayoneSubForm |
|
21
|
|
|
{ |
|
22
|
|
|
/** |
|
23
|
|
|
* @var string |
|
24
|
|
|
*/ |
|
25
|
|
|
public const PAYMENT_METHOD = 'security_invoice'; |
|
26
|
|
|
|
|
27
|
|
|
/** |
|
28
|
|
|
* @return string |
|
29
|
|
|
*/ |
|
30
|
|
|
public function getName(): string |
|
31
|
|
|
{ |
|
32
|
|
|
return PaymentTransfer::PAYONE_SECURITY_INVOICE; |
|
33
|
|
|
} |
|
34
|
|
|
|
|
35
|
|
|
/** |
|
36
|
|
|
* @return string |
|
37
|
|
|
*/ |
|
38
|
|
|
public function getPropertyPath(): string |
|
39
|
|
|
{ |
|
40
|
|
|
return PaymentTransfer::PAYONE_SECURITY_INVOICE; |
|
41
|
|
|
} |
|
42
|
|
|
|
|
43
|
|
|
/** |
|
44
|
|
|
* @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver |
|
45
|
|
|
* |
|
46
|
|
|
* @return void |
|
47
|
|
|
*/ |
|
48
|
|
|
public function configureOptions(OptionsResolver $resolver): void |
|
49
|
|
|
{ |
|
50
|
|
|
$resolver->setDefaults([ |
|
51
|
|
|
'data_class' => PayonePaymentTransfer::class, |
|
52
|
|
|
])->setRequired(SubFormInterface::OPTIONS_FIELD_NAME); |
|
53
|
|
|
} |
|
54
|
|
|
|
|
55
|
|
|
/** |
|
56
|
|
|
* @param \Symfony\Component\OptionsResolver\OptionsResolver $resolver |
|
57
|
|
|
* |
|
58
|
|
|
* @return void |
|
59
|
|
|
*/ |
|
60
|
|
|
public function setDefaultOptions(OptionsResolver $resolver): void |
|
61
|
|
|
{ |
|
62
|
|
|
$this->configureOptions($resolver); |
|
63
|
|
|
} |
|
64
|
|
|
|
|
65
|
|
|
/** |
|
66
|
|
|
* @param \Symfony\Component\Form\FormBuilderInterface $builder |
|
67
|
|
|
* @param array $options |
|
68
|
|
|
* |
|
69
|
|
|
* @return void |
|
70
|
|
|
*/ |
|
71
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options): void |
|
72
|
|
|
{ |
|
73
|
|
|
$this->addLabel($builder); |
|
74
|
|
|
} |
|
75
|
|
|
|
|
76
|
|
|
/** |
|
77
|
|
|
* @param \Symfony\Component\Form\FormBuilderInterface $builder |
|
78
|
|
|
* |
|
79
|
|
|
* @return \Spryker\Yves\StepEngine\Dependency\Form\SubFormInterface |
|
80
|
|
|
*/ |
|
81
|
|
|
protected function addLabel(FormBuilderInterface $builder): SubFormInterface |
|
82
|
|
|
{ |
|
83
|
|
|
$builder->add( |
|
84
|
|
|
static::FIELD_PAYMENT_METHOD, |
|
85
|
|
|
HiddenType::class, |
|
86
|
|
|
[ |
|
87
|
|
|
'label' => false, |
|
88
|
|
|
'required' => false, |
|
89
|
|
|
'data' => [], |
|
90
|
|
|
], |
|
91
|
|
|
); |
|
92
|
|
|
|
|
93
|
|
|
return $this; |
|
94
|
|
|
} |
|
95
|
|
|
} |
|
96
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths