|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* Copyright © 2016-present Spryker Systems GmbH. All rights reserved. |
|
5
|
|
|
* Use of this software requires acceptance of the Evaluation License Agreement. See LICENSE file. |
|
6
|
|
|
*/ |
|
7
|
|
|
|
|
8
|
|
|
namespace SprykerEco\Zed\PunchoutCatalogs\Communication\Form; |
|
9
|
|
|
|
|
10
|
|
|
use Generated\Shared\Transfer\PunchoutCatalogConnectionCartTransfer; |
|
|
|
|
|
|
11
|
|
|
use Generated\Shared\Transfer\PunchoutCatalogConnectionTransfer; |
|
|
|
|
|
|
12
|
|
|
use Spryker\Zed\Kernel\Communication\Form\AbstractType; |
|
13
|
|
|
use Symfony\Component\Form\Extension\Core\Type\ChoiceType; |
|
14
|
|
|
use Symfony\Component\Form\FormBuilderInterface; |
|
15
|
|
|
use Symfony\Component\Validator\Constraints\NotBlank; |
|
16
|
|
|
|
|
17
|
|
|
/** |
|
18
|
|
|
* @method \SprykerEco\Zed\PunchoutCatalogs\PunchoutCatalogsConfig getConfig() |
|
19
|
|
|
* @method \SprykerEco\Zed\PunchoutCatalogs\Persistence\PunchoutCatalogsRepositoryInterface getRepository() |
|
20
|
|
|
* @method \SprykerEco\Zed\PunchoutCatalogs\Business\PunchoutCatalogsFacadeInterface getFacade() |
|
21
|
|
|
* @method \SprykerEco\Zed\PunchoutCatalogs\Communication\PunchoutCatalogsCommunicationFactory getFactory() |
|
22
|
|
|
*/ |
|
23
|
|
|
class PunchoutCatalogSetupRequestBundleModeForm extends AbstractType |
|
24
|
|
|
{ |
|
25
|
|
|
/** |
|
26
|
|
|
* @param \Symfony\Component\Form\FormBuilderInterface $builder |
|
27
|
|
|
* @param array $options |
|
28
|
|
|
* |
|
29
|
|
|
* @return void |
|
30
|
|
|
*/ |
|
31
|
|
|
public function buildForm(FormBuilderInterface $builder, array $options): void |
|
32
|
|
|
{ |
|
33
|
|
|
$this->addBundleModeField($builder); |
|
34
|
|
|
} |
|
35
|
|
|
|
|
36
|
|
|
/** |
|
37
|
|
|
* @param \Symfony\Component\Form\FormBuilderInterface $builder |
|
38
|
|
|
* |
|
39
|
|
|
* @return $this |
|
40
|
|
|
*/ |
|
41
|
|
|
protected function addBundleModeField(FormBuilderInterface $builder) |
|
42
|
|
|
{ |
|
43
|
|
|
$choices = $this->getFactory() |
|
44
|
|
|
->createPunchoutCatalogSetupRequestConnectionTypeFormDataProvider() |
|
45
|
|
|
->getBundleModeChoices(); |
|
46
|
|
|
|
|
47
|
|
|
$builder->add(PunchoutCatalogConnectionCartTransfer::BUNDLE_MODE, ChoiceType::class, [ |
|
48
|
|
|
'choices' => $choices, |
|
49
|
|
|
'label' => 'Bundle Support', |
|
50
|
|
|
'constraints' => [ |
|
51
|
|
|
new NotBlank(), |
|
52
|
|
|
], |
|
53
|
|
|
'property_path' => PunchoutCatalogConnectionTransfer::CART . '.' . PunchoutCatalogConnectionCartTransfer::BUNDLE_MODE, |
|
54
|
|
|
]); |
|
55
|
|
|
|
|
56
|
|
|
return $this; |
|
57
|
|
|
} |
|
58
|
|
|
} |
|
59
|
|
|
|
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