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 SprykerShop\Yves\OrderCustomReferenceWidget; |
9
|
|
|
|
10
|
|
|
use Spryker\Shared\Application\ApplicationConstants; |
11
|
|
|
use Spryker\Yves\Kernel\AbstractFactory; |
12
|
|
|
use SprykerShop\Yves\OrderCustomReferenceWidget\Dependency\Client\OrderCustomReferenceWidgetToOrderCustomReferenceClientInterface; |
13
|
|
|
use SprykerShop\Yves\OrderCustomReferenceWidget\Dependency\Client\OrderCustomReferenceWidgetToQuoteClientInterface; |
14
|
|
|
use SprykerShop\Yves\OrderCustomReferenceWidget\Form\OrderCustomReferenceForm; |
15
|
|
|
use Symfony\Component\Form\FormFactoryInterface; |
16
|
|
|
use Symfony\Component\Form\FormInterface; |
17
|
|
|
|
18
|
|
|
class OrderCustomReferenceWidgetFactory extends AbstractFactory |
19
|
|
|
{ |
20
|
|
|
/** |
21
|
|
|
* @return \SprykerShop\Yves\OrderCustomReferenceWidget\Dependency\Client\OrderCustomReferenceWidgetToOrderCustomReferenceClientInterface |
22
|
|
|
*/ |
23
|
|
|
public function getOrderCustomReferenceClient(): OrderCustomReferenceWidgetToOrderCustomReferenceClientInterface |
24
|
|
|
{ |
25
|
|
|
return $this->getProvidedDependency(OrderCustomReferenceWidgetDependencyProvider::CLIENT_ORDER_CUSTOM_REFERENCE); |
26
|
|
|
} |
27
|
|
|
|
28
|
|
|
/** |
29
|
|
|
* @return \SprykerShop\Yves\OrderCustomReferenceWidget\Dependency\Client\OrderCustomReferenceWidgetToQuoteClientInterface |
30
|
|
|
*/ |
31
|
|
|
public function getQuoteClient(): OrderCustomReferenceWidgetToQuoteClientInterface |
32
|
|
|
{ |
33
|
|
|
return $this->getProvidedDependency(OrderCustomReferenceWidgetDependencyProvider::CLIENT_QUOTE); |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
/** |
37
|
|
|
* @param array $data |
38
|
|
|
* |
39
|
|
|
* @return \Symfony\Component\Form\FormInterface |
40
|
|
|
*/ |
41
|
|
|
public function getOrderCustomReferenceForm(array $data = []): FormInterface |
42
|
|
|
{ |
43
|
|
|
return $this->getFormFactory()->create(OrderCustomReferenceForm::class, $data); |
44
|
|
|
} |
45
|
|
|
|
46
|
|
|
/** |
47
|
|
|
* @return \Symfony\Component\Form\FormFactoryInterface |
48
|
|
|
*/ |
49
|
|
|
public function getFormFactory(): FormFactoryInterface |
50
|
|
|
{ |
51
|
|
|
return $this->getProvidedDependency(ApplicationConstants::FORM_FACTORY); |
52
|
|
|
} |
53
|
|
|
} |
54
|
|
|
|