1 | <?php |
||
27 | class Builder |
||
28 | { |
||
29 | /** |
||
30 | * @var \LizardMedia\ProductAttachment\Api\Data\AttachmentFactoryInterface |
||
31 | */ |
||
32 | private $componentFactory; |
||
33 | |||
34 | |||
35 | /** |
||
36 | * @var \LizardMedia\ProductAttachment\Api\Data\AttachmentInterface |
||
37 | */ |
||
38 | private $component; |
||
39 | |||
40 | |||
41 | /** |
||
42 | * @var \Magento\Downloadable\Helper\File |
||
43 | */ |
||
44 | private $downloadableFile; |
||
45 | |||
46 | |||
47 | /** |
||
48 | * @var \Magento\Framework\Api\DataObjectHelper |
||
49 | */ |
||
50 | private $dataObjectHelper; |
||
51 | |||
52 | |||
53 | /** |
||
54 | * @var \Magento\Framework\DataObject\Copy |
||
55 | */ |
||
56 | private $objectCopyService; |
||
57 | |||
58 | |||
59 | /** |
||
60 | * @var array |
||
61 | */ |
||
62 | private $data = []; |
||
63 | |||
64 | |||
65 | /** |
||
66 | * @param \LizardMedia\ProductAttachment\Api\Data\AttachmentFactoryInterface $componentFactory |
||
67 | * @param \Magento\Downloadable\Helper\File $downloadableFile |
||
68 | * @param \Magento\Framework\Api\DataObjectHelper $dataObjectHelper |
||
69 | * @param \Magento\Framework\DataObject\Copy $objectCopyService |
||
70 | */ |
||
71 | public function __construct( |
||
82 | |||
83 | |||
84 | /** |
||
85 | * @param array $data |
||
86 | * |
||
87 | * @return $this |
||
88 | */ |
||
89 | public function setData(array $data) |
||
94 | |||
95 | |||
96 | /** |
||
97 | * @param \LizardMedia\ProductAttachment\Api\Data\AttachmentInterface $attachment |
||
98 | * |
||
99 | * @throws \Magento\Framework\Exception\LocalizedException |
||
100 | * |
||
101 | * @return \LizardMedia\ProductAttachment\Api\Data\AttachmentInterface $attachment |
||
102 | */ |
||
103 | public function build(AttachmentInterface $attachment) |
||
145 | |||
146 | |||
147 | /** |
||
148 | * @return void |
||
149 | */ |
||
150 | private function resetData() : void |
||
154 | |||
155 | |||
156 | /** |
||
157 | * @return \LizardMedia\ProductAttachment\Api\Data\AttachmentInterface |
||
158 | */ |
||
159 | private function getComponent() |
||
167 | } |
||
168 |