|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
/** |
|
4
|
|
|
* TechDivision\Import\Product\Variant\Services\ProductVariantProcessor |
|
5
|
|
|
* |
|
6
|
|
|
* NOTICE OF LICENSE |
|
7
|
|
|
* |
|
8
|
|
|
* This source file is subject to the Open Software License (OSL 3.0) |
|
9
|
|
|
* that is available through the world-wide-web at this URL: |
|
10
|
|
|
* http://opensource.org/licenses/osl-3.0.php |
|
11
|
|
|
* |
|
12
|
|
|
* PHP version 5 |
|
13
|
|
|
* |
|
14
|
|
|
* @author Tim Wagner <[email protected]> |
|
15
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
|
16
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
17
|
|
|
* @link https://github.com/techdivision/import-product-variant |
|
18
|
|
|
* @link http://www.techdivision.com |
|
19
|
|
|
*/ |
|
20
|
|
|
|
|
21
|
|
|
namespace TechDivision\Import\Product\Variant\Services; |
|
22
|
|
|
|
|
23
|
|
|
use TechDivision\Import\Loaders\LoaderInterface; |
|
24
|
|
|
use TechDivision\Import\Actions\ActionInterface; |
|
25
|
|
|
use TechDivision\Import\Connection\ConnectionInterface; |
|
26
|
|
|
use TechDivision\Import\Repositories\EavAttributeRepositoryInterface; |
|
27
|
|
|
use TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface; |
|
28
|
|
|
use TechDivision\Import\Product\Repositories\ProductRelationRepositoryInterface; |
|
29
|
|
|
use TechDivision\Import\Product\Variant\Repositories\ProductSuperLinkRepositoryInterface; |
|
30
|
|
|
use TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeRepositoryInterface; |
|
31
|
|
|
use TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeLabelRepositoryInterface; |
|
32
|
|
|
|
|
33
|
|
|
/** |
|
34
|
|
|
* The product variant processor implementation. |
|
35
|
|
|
* |
|
36
|
|
|
* @author Tim Wagner <[email protected]> |
|
37
|
|
|
* @copyright 2016 TechDivision GmbH <[email protected]> |
|
38
|
|
|
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) |
|
39
|
|
|
* @link https://github.com/techdivision/import-product-variant |
|
40
|
|
|
* @link http://www.techdivision.com |
|
41
|
|
|
*/ |
|
42
|
|
|
class ProductVariantProcessor implements ProductVariantProcessorInterface |
|
43
|
|
|
{ |
|
44
|
|
|
|
|
45
|
|
|
/** |
|
46
|
|
|
* A PDO connection initialized with the values from the Doctrine EntityManager. |
|
47
|
|
|
* |
|
48
|
|
|
* @var \TechDivision\Import\Connection\ConnectionInterface |
|
49
|
|
|
*/ |
|
50
|
|
|
protected $connection; |
|
51
|
|
|
|
|
52
|
|
|
/** |
|
53
|
|
|
* The repository to access product relations. |
|
54
|
|
|
* |
|
55
|
|
|
* @var \TechDivision\Import\Product\Repositories\ProductRelationRepositoryInterface |
|
56
|
|
|
*/ |
|
57
|
|
|
protected $productRelationRepository; |
|
58
|
|
|
|
|
59
|
|
|
/** |
|
60
|
|
|
* The repository to access product relations. |
|
61
|
|
|
* |
|
62
|
|
|
* @var \TechDivision\Import\Product\Variant\Repositories\ProductSuperLinkRepositoryInterface |
|
63
|
|
|
*/ |
|
64
|
|
|
protected $productSuperLinkRepository; |
|
65
|
|
|
|
|
66
|
|
|
/** |
|
67
|
|
|
* The repository to access product super attributes. |
|
68
|
|
|
* |
|
69
|
|
|
* @var \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeRepositoryInterface |
|
70
|
|
|
*/ |
|
71
|
|
|
protected $productSuperAttributeRepository; |
|
72
|
|
|
|
|
73
|
|
|
/** |
|
74
|
|
|
* The repository to access product super attribute labels. |
|
75
|
|
|
* |
|
76
|
|
|
* @var \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeLabelRepositoryInterface |
|
77
|
|
|
*/ |
|
78
|
|
|
protected $productSuperAttributeLabelRepository; |
|
79
|
|
|
|
|
80
|
|
|
/** |
|
81
|
|
|
* The repository to access EAV attributes. |
|
82
|
|
|
* |
|
83
|
|
|
* @var \TechDivision\Import\Repositories\EavAttributeRepositoryInterface |
|
84
|
|
|
*/ |
|
85
|
|
|
protected $eavAttributeRepository; |
|
86
|
|
|
|
|
87
|
|
|
/** |
|
88
|
|
|
* The repository to access EAV attribute option values. |
|
89
|
|
|
* |
|
90
|
|
|
* @var \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface |
|
91
|
|
|
*/ |
|
92
|
|
|
protected $eavAttributeOptionValueRepository; |
|
93
|
|
|
|
|
94
|
|
|
/** |
|
95
|
|
|
* The action for product relation CRUD methods. |
|
96
|
|
|
* |
|
97
|
|
|
* @var \TechDivision\Import\Actions\ActionInterface |
|
98
|
|
|
*/ |
|
99
|
|
|
protected $productRelationAction; |
|
100
|
|
|
|
|
101
|
|
|
/** |
|
102
|
|
|
* The action for product super attribute CRUD methods. |
|
103
|
|
|
* |
|
104
|
|
|
* @var \TechDivision\Import\Actions\ActionInterface |
|
105
|
|
|
*/ |
|
106
|
|
|
protected $productSuperAttributeAction; |
|
107
|
|
|
|
|
108
|
|
|
/** |
|
109
|
|
|
* The action for product super attribute label CRUD methods. |
|
110
|
|
|
* |
|
111
|
|
|
* @var \TechDivision\Import\Actions\ActionInterface |
|
112
|
|
|
*/ |
|
113
|
|
|
protected $productSuperAttributeLabelAction; |
|
114
|
|
|
|
|
115
|
|
|
/** |
|
116
|
|
|
* The action for product super link CRUD methods. |
|
117
|
|
|
* |
|
118
|
|
|
* @var \TechDivision\Import\Actions\ActionInterface |
|
119
|
|
|
*/ |
|
120
|
|
|
protected $productSuperLinkAction; |
|
121
|
|
|
|
|
122
|
|
|
/** |
|
123
|
|
|
* The raw entity loader instance. |
|
124
|
|
|
* |
|
125
|
|
|
* @var \TechDivision\Import\Loaders\LoaderInterface |
|
126
|
|
|
*/ |
|
127
|
|
|
protected $rawEntityLoader; |
|
128
|
|
|
|
|
129
|
|
|
/** |
|
130
|
|
|
* Initialize the processor with the necessary assembler and repository instances. |
|
131
|
|
|
* |
|
132
|
|
|
* @param \TechDivision\Import\Connection\ConnectionInterface $connection The connection to use |
|
133
|
|
|
* @param \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository The EAV attribute option value repository to use |
|
134
|
|
|
* @param \TechDivision\Import\Repositories\EavAttributeRepositoryInterface $eavAttributeRepository The EAV attribute repository to use |
|
135
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductRelationRepositoryInterface $productRelationRepository The product relation repository to use |
|
136
|
|
|
* @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperLinkRepositoryInterface $productSuperLinkRepository The product super link repository to use |
|
137
|
|
|
* @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeRepositoryInterface $productSuperAttributeRepository The product super attribute repository to use |
|
138
|
|
|
* @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeLabelRepositoryInterface $productSuperAttributeLabelRepository The product super attribute label repository to use |
|
139
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productRelationAction The product relation action to use |
|
140
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productSuperLinkAction The product super link action to use |
|
141
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productSuperAttributeAction The product super attribute action to use |
|
142
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productSuperAttributeLabelAction The product super attribute label action to use |
|
143
|
|
|
* @param \TechDivision\Import\Loaders\LoaderInterface $rawEntityLoader The raw entity loader instance |
|
144
|
|
|
*/ |
|
145
|
|
|
public function __construct( |
|
146
|
|
|
ConnectionInterface $connection, |
|
147
|
|
|
EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository, |
|
148
|
|
|
EavAttributeRepositoryInterface $eavAttributeRepository, |
|
149
|
|
|
ProductRelationRepositoryInterface $productRelationRepository, |
|
150
|
|
|
ProductSuperLinkRepositoryInterface $productSuperLinkRepository, |
|
151
|
|
|
ProductSuperAttributeRepositoryInterface $productSuperAttributeRepository, |
|
152
|
|
|
ProductSuperAttributeLabelRepositoryInterface $productSuperAttributeLabelRepository, |
|
153
|
|
|
ActionInterface $productRelationAction, |
|
154
|
|
|
ActionInterface $productSuperLinkAction, |
|
155
|
|
|
ActionInterface $productSuperAttributeAction, |
|
156
|
|
|
ActionInterface $productSuperAttributeLabelAction, |
|
157
|
|
|
LoaderInterface $rawEntityLoader |
|
158
|
|
|
) { |
|
159
|
|
|
$this->setConnection($connection); |
|
160
|
|
|
$this->setEavAttributeOptionValueRepository($eavAttributeOptionValueRepository); |
|
161
|
|
|
$this->setEavAttributeRepository($eavAttributeRepository); |
|
162
|
|
|
$this->setProductRelationRepository($productRelationRepository); |
|
163
|
|
|
$this->setProductSuperLinkRepository($productSuperLinkRepository); |
|
164
|
|
|
$this->setProductSuperAttributeRepository($productSuperAttributeRepository); |
|
165
|
|
|
$this->setProductSuperAttributeLabelRepository($productSuperAttributeLabelRepository); |
|
166
|
|
|
$this->setProductRelationAction($productRelationAction); |
|
167
|
|
|
$this->setProductSuperLinkAction($productSuperLinkAction); |
|
168
|
|
|
$this->setProductSuperAttributeAction($productSuperAttributeAction); |
|
169
|
|
|
$this->setProductSuperAttributeLabelAction($productSuperAttributeLabelAction); |
|
170
|
|
|
$this->setRawEntityLoader($rawEntityLoader); |
|
171
|
|
|
} |
|
172
|
|
|
|
|
173
|
|
|
/** |
|
174
|
|
|
* Set's the raw entity loader instance. |
|
175
|
|
|
* |
|
176
|
|
|
* @param \TechDivision\Import\Loaders\LoaderInterface $rawEntityLoader The raw entity loader instance to set |
|
177
|
|
|
* |
|
178
|
|
|
* @return void |
|
179
|
|
|
*/ |
|
180
|
|
|
public function setRawEntityLoader(LoaderInterface $rawEntityLoader) |
|
181
|
|
|
{ |
|
182
|
|
|
$this->rawEntityLoader = $rawEntityLoader; |
|
183
|
|
|
} |
|
184
|
|
|
|
|
185
|
|
|
/** |
|
186
|
|
|
* Return's the raw entity loader instance. |
|
187
|
|
|
* |
|
188
|
|
|
* @return \TechDivision\Import\Loaders\LoaderInterface The raw entity loader instance |
|
189
|
|
|
*/ |
|
190
|
|
|
public function getRawEntityLoader() |
|
191
|
|
|
{ |
|
192
|
|
|
return $this->rawEntityLoader; |
|
193
|
|
|
} |
|
194
|
|
|
|
|
195
|
|
|
/** |
|
196
|
|
|
* Set's the passed connection. |
|
197
|
|
|
* |
|
198
|
|
|
* @param \TechDivision\Import\Connection\ConnectionInterface $connection The connection to set |
|
199
|
|
|
* |
|
200
|
|
|
* @return void |
|
201
|
|
|
*/ |
|
202
|
|
|
public function setConnection(ConnectionInterface $connection) |
|
203
|
|
|
{ |
|
204
|
|
|
$this->connection = $connection; |
|
205
|
|
|
} |
|
206
|
|
|
|
|
207
|
|
|
/** |
|
208
|
|
|
* Return's the connection. |
|
209
|
|
|
* |
|
210
|
|
|
* @return \TechDivision\Import\Connection\ConnectionInterface The connection instance |
|
211
|
|
|
*/ |
|
212
|
|
|
public function getConnection() |
|
213
|
|
|
{ |
|
214
|
|
|
return $this->connection; |
|
215
|
|
|
} |
|
216
|
|
|
|
|
217
|
|
|
/** |
|
218
|
|
|
* Turns off autocommit mode. While autocommit mode is turned off, changes made to the database via the PDO |
|
219
|
|
|
* object instance are not committed until you end the transaction by calling ProductProcessor::commit(). |
|
220
|
|
|
* Calling ProductProcessor::rollBack() will roll back all changes to the database and return the connection |
|
221
|
|
|
* to autocommit mode. |
|
222
|
|
|
* |
|
223
|
|
|
* @return boolean Returns TRUE on success or FALSE on failure |
|
224
|
|
|
* @link http://php.net/manual/en/pdo.begintransaction.php |
|
225
|
|
|
*/ |
|
226
|
|
|
public function beginTransaction() |
|
227
|
|
|
{ |
|
228
|
|
|
return $this->connection->beginTransaction(); |
|
229
|
|
|
} |
|
230
|
|
|
|
|
231
|
|
|
/** |
|
232
|
|
|
* Commits a transaction, returning the database connection to autocommit mode until the next call to |
|
233
|
|
|
* ProductProcessor::beginTransaction() starts a new transaction. |
|
234
|
|
|
* |
|
235
|
|
|
* @return boolean Returns TRUE on success or FALSE on failure |
|
236
|
|
|
* @link http://php.net/manual/en/pdo.commit.php |
|
237
|
|
|
*/ |
|
238
|
|
|
public function commit() |
|
239
|
|
|
{ |
|
240
|
|
|
return $this->connection->commit(); |
|
241
|
|
|
} |
|
242
|
|
|
|
|
243
|
|
|
/** |
|
244
|
|
|
* Rolls back the current transaction, as initiated by ProductProcessor::beginTransaction(). |
|
245
|
|
|
* |
|
246
|
|
|
* If the database was set to autocommit mode, this function will restore autocommit mode after it has |
|
247
|
|
|
* rolled back the transaction. |
|
248
|
|
|
* |
|
249
|
|
|
* Some databases, including MySQL, automatically issue an implicit COMMIT when a database definition |
|
250
|
|
|
* language (DDL) statement such as DROP TABLE or CREATE TABLE is issued within a transaction. The implicit |
|
251
|
|
|
* COMMIT will prevent you from rolling back any other changes within the transaction boundary. |
|
252
|
|
|
* |
|
253
|
|
|
* @return boolean Returns TRUE on success or FALSE on failure |
|
254
|
|
|
* @link http://php.net/manual/en/pdo.rollback.php |
|
255
|
|
|
*/ |
|
256
|
|
|
public function rollBack() |
|
257
|
|
|
{ |
|
258
|
|
|
return $this->connection->rollBack(); |
|
259
|
|
|
} |
|
260
|
|
|
|
|
261
|
|
|
/** |
|
262
|
|
|
* Set's the repository to access EAV attributes. |
|
263
|
|
|
* |
|
264
|
|
|
* @param \TechDivision\Import\Repositories\EavAttributeRepositoryInterface $eavAttributeRepository The repository to access EAV attributes |
|
265
|
|
|
* |
|
266
|
|
|
* @return void |
|
267
|
|
|
*/ |
|
268
|
|
|
public function setEavAttributeRepository(EavAttributeRepositoryInterface $eavAttributeRepository) |
|
269
|
|
|
{ |
|
270
|
|
|
$this->eavAttributeRepository = $eavAttributeRepository; |
|
271
|
|
|
} |
|
272
|
|
|
|
|
273
|
|
|
/** |
|
274
|
|
|
* Return's the repository to access EAV attributes. |
|
275
|
|
|
* |
|
276
|
|
|
* @return \TechDivision\Import\Repositories\EavAttributeRepositoryInterface The repository instance |
|
277
|
|
|
*/ |
|
278
|
|
|
public function getEavAttributeRepository() |
|
279
|
|
|
{ |
|
280
|
|
|
return $this->eavAttributeRepository; |
|
281
|
|
|
} |
|
282
|
|
|
|
|
283
|
|
|
/** |
|
284
|
|
|
* Set's the repository to access product relations. |
|
285
|
|
|
* |
|
286
|
|
|
* @param \TechDivision\Import\Product\Repositories\ProductRelationRepositoryInterface $productRelationRepository The repository instance |
|
287
|
|
|
* |
|
288
|
|
|
* @return void |
|
289
|
|
|
*/ |
|
290
|
|
|
public function setProductRelationRepository(ProductRelationRepositoryInterface $productRelationRepository) |
|
291
|
|
|
{ |
|
292
|
|
|
$this->productRelationRepository = $productRelationRepository; |
|
293
|
|
|
} |
|
294
|
|
|
|
|
295
|
|
|
/** |
|
296
|
|
|
* Return's the repository to access product relations. |
|
297
|
|
|
* |
|
298
|
|
|
* @return \TechDivision\Import\Product\Repositories\ProductRelationRepositoryInterface The repository instance |
|
299
|
|
|
*/ |
|
300
|
|
|
public function getProductRelationRepository() |
|
301
|
|
|
{ |
|
302
|
|
|
return $this->productRelationRepository; |
|
303
|
|
|
} |
|
304
|
|
|
|
|
305
|
|
|
/** |
|
306
|
|
|
* Set's the repository to access product super links. |
|
307
|
|
|
* |
|
308
|
|
|
* @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperLinkRepositoryInterface $productSuperLinkRepository The repository instance |
|
309
|
|
|
* |
|
310
|
|
|
* @return void |
|
311
|
|
|
*/ |
|
312
|
|
|
public function setProductSuperLinkRepository(ProductSuperLinkRepositoryInterface $productSuperLinkRepository) |
|
313
|
|
|
{ |
|
314
|
|
|
$this->productSuperLinkRepository = $productSuperLinkRepository; |
|
315
|
|
|
} |
|
316
|
|
|
|
|
317
|
|
|
/** |
|
318
|
|
|
* Return's the repository to access product super links. |
|
319
|
|
|
* |
|
320
|
|
|
* @return \TechDivision\Import\Product\Variant\Repositories\ProductSuperLinkRepositoryInterface The repository instance |
|
321
|
|
|
*/ |
|
322
|
|
|
public function getProductSuperLinkRepository() |
|
323
|
|
|
{ |
|
324
|
|
|
return $this->productSuperLinkRepository; |
|
325
|
|
|
} |
|
326
|
|
|
|
|
327
|
|
|
/** |
|
328
|
|
|
* Set's the repository to access product super attributes. |
|
329
|
|
|
* |
|
330
|
|
|
* @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeRepositoryInterface $productSuperAttributeRepository The repository instance |
|
331
|
|
|
* |
|
332
|
|
|
* @return void |
|
333
|
|
|
*/ |
|
334
|
|
|
public function setProductSuperAttributeRepository(ProductSuperAttributeRepositoryInterface $productSuperAttributeRepository) |
|
335
|
|
|
{ |
|
336
|
|
|
$this->productSuperAttributeRepository = $productSuperAttributeRepository; |
|
337
|
|
|
} |
|
338
|
|
|
|
|
339
|
|
|
/** |
|
340
|
|
|
* Return's the repository to access product super attributes. |
|
341
|
|
|
* |
|
342
|
|
|
* @return \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeRepositoryInterface The repository instance |
|
343
|
|
|
*/ |
|
344
|
|
|
public function getProductSuperAttributeRepository() |
|
345
|
|
|
{ |
|
346
|
|
|
return $this->productSuperAttributeRepository; |
|
347
|
|
|
} |
|
348
|
|
|
|
|
349
|
|
|
/** |
|
350
|
|
|
* Set's the repository to access product super attribute labels. |
|
351
|
|
|
* |
|
352
|
|
|
* @param \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeLabelRepositoryInterface $productSuperAttributeLabelRepository The repository instance |
|
353
|
|
|
* |
|
354
|
|
|
* @return void |
|
355
|
|
|
*/ |
|
356
|
|
|
public function setProductSuperAttributeLabelRepository(ProductSuperAttributeLabelRepositoryInterface $productSuperAttributeLabelRepository) |
|
357
|
|
|
{ |
|
358
|
|
|
$this->productSuperAttributeLabelRepository = $productSuperAttributeLabelRepository; |
|
359
|
|
|
} |
|
360
|
|
|
|
|
361
|
|
|
/** |
|
362
|
|
|
* Return's the repository to access product super attribute labels. |
|
363
|
|
|
* |
|
364
|
|
|
* @return \TechDivision\Import\Product\Variant\Repositories\ProductSuperAttributeLabelRepositoryInterface The repository instance |
|
365
|
|
|
*/ |
|
366
|
|
|
public function getProductSuperAttributeLabelRepository() |
|
367
|
|
|
{ |
|
368
|
|
|
return $this->productSuperAttributeLabelRepository; |
|
369
|
|
|
} |
|
370
|
|
|
|
|
371
|
|
|
/** |
|
372
|
|
|
* Set's the repository to access EAV attribute option values. |
|
373
|
|
|
* |
|
374
|
|
|
* @param \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository The repository to access EAV attribute option values |
|
375
|
|
|
* |
|
376
|
|
|
* @return void |
|
377
|
|
|
*/ |
|
378
|
|
|
public function setEavAttributeOptionValueRepository(EavAttributeOptionValueRepositoryInterface $eavAttributeOptionValueRepository) |
|
379
|
|
|
{ |
|
380
|
|
|
$this->eavAttributeOptionValueRepository = $eavAttributeOptionValueRepository; |
|
381
|
|
|
} |
|
382
|
|
|
|
|
383
|
|
|
/** |
|
384
|
|
|
* Return's the repository to access EAV attribute option values. |
|
385
|
|
|
* |
|
386
|
|
|
* @return \TechDivision\Import\Repositories\EavAttributeOptionValueRepositoryInterface The repository instance |
|
387
|
|
|
*/ |
|
388
|
|
|
public function getEavAttributeOptionValueRepository() |
|
389
|
|
|
{ |
|
390
|
|
|
return $this->eavAttributeOptionValueRepository; |
|
391
|
|
|
} |
|
392
|
|
|
|
|
393
|
|
|
/** |
|
394
|
|
|
* Set's the action with the product relation CRUD methods. |
|
395
|
|
|
* |
|
396
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productRelationAction The action with the product relation CRUD methods |
|
397
|
|
|
* |
|
398
|
|
|
* @return void |
|
399
|
|
|
*/ |
|
400
|
|
|
public function setProductRelationAction(ActionInterface $productRelationAction) |
|
401
|
|
|
{ |
|
402
|
|
|
$this->productRelationAction = $productRelationAction; |
|
403
|
|
|
} |
|
404
|
|
|
|
|
405
|
|
|
/** |
|
406
|
|
|
* Return's the action with the product relation CRUD methods. |
|
407
|
|
|
* |
|
408
|
|
|
* @return \TechDivision\Import\Actions\ActionInterface The action instance |
|
409
|
|
|
*/ |
|
410
|
|
|
public function getProductRelationAction() |
|
411
|
|
|
{ |
|
412
|
|
|
return $this->productRelationAction; |
|
413
|
|
|
} |
|
414
|
|
|
|
|
415
|
|
|
/** |
|
416
|
|
|
* Set's the action with the product super attribute CRUD methods. |
|
417
|
|
|
* |
|
418
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productSuperAttributeAction The action with the product super attribute CRUD methods |
|
419
|
|
|
* |
|
420
|
|
|
* @return void |
|
421
|
|
|
*/ |
|
422
|
|
|
public function setProductSuperAttributeAction(ActionInterface $productSuperAttributeAction) |
|
423
|
|
|
{ |
|
424
|
|
|
$this->productSuperAttributeAction = $productSuperAttributeAction; |
|
425
|
|
|
} |
|
426
|
|
|
|
|
427
|
|
|
/** |
|
428
|
|
|
* Return's the action with the product super attribute CRUD methods. |
|
429
|
|
|
* |
|
430
|
|
|
* @return \TechDivision\Import\Actions\ActionInterface The action instance |
|
431
|
|
|
*/ |
|
432
|
|
|
public function getProductSuperAttributeAction() |
|
433
|
|
|
{ |
|
434
|
|
|
return $this->productSuperAttributeAction; |
|
435
|
|
|
} |
|
436
|
|
|
|
|
437
|
|
|
/** |
|
438
|
|
|
* Set's the action with the product super attribute label CRUD methods. |
|
439
|
|
|
* |
|
440
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productSuperAttributeLabelAction The action with the product super attribute label CRUD methods |
|
441
|
|
|
* |
|
442
|
|
|
* @return void |
|
443
|
|
|
*/ |
|
444
|
|
|
public function setProductSuperAttributeLabelAction(ActionInterface $productSuperAttributeLabelAction) |
|
445
|
|
|
{ |
|
446
|
|
|
$this->productSuperAttributeLabelAction = $productSuperAttributeLabelAction; |
|
447
|
|
|
} |
|
448
|
|
|
|
|
449
|
|
|
/** |
|
450
|
|
|
* Return's the action with the product super attribute label CRUD methods. |
|
451
|
|
|
* |
|
452
|
|
|
* @return \TechDivision\Import\Actions\ActionInterface The action instance |
|
453
|
|
|
*/ |
|
454
|
|
|
public function getProductSuperAttributeLabelAction() |
|
455
|
|
|
{ |
|
456
|
|
|
return $this->productSuperAttributeLabelAction; |
|
457
|
|
|
} |
|
458
|
|
|
|
|
459
|
|
|
/** |
|
460
|
|
|
* Set's the action with the product super link CRUD methods. |
|
461
|
|
|
* |
|
462
|
|
|
* @param \TechDivision\Import\Actions\ActionInterface $productSuperLinkAction The action with the product super link CRUD methods |
|
463
|
|
|
* |
|
464
|
|
|
* @return void |
|
465
|
|
|
*/ |
|
466
|
|
|
public function setProductSuperLinkAction(ActionInterface $productSuperLinkAction) |
|
467
|
|
|
{ |
|
468
|
|
|
$this->productSuperLinkAction = $productSuperLinkAction; |
|
469
|
|
|
} |
|
470
|
|
|
|
|
471
|
|
|
/** |
|
472
|
|
|
* Return's the action with the product super link CRUD methods. |
|
473
|
|
|
* |
|
474
|
|
|
* @return \TechDivision\Import\Actions\ActionInterface The action instance |
|
475
|
|
|
*/ |
|
476
|
|
|
public function getProductSuperLinkAction() |
|
477
|
|
|
{ |
|
478
|
|
|
return $this->productSuperLinkAction; |
|
479
|
|
|
} |
|
480
|
|
|
|
|
481
|
|
|
/** |
|
482
|
|
|
* Return's the attribute option value with the passed value and store ID. |
|
483
|
|
|
* |
|
484
|
|
|
* @param mixed $value The option value |
|
485
|
|
|
* @param integer $storeId The ID of the store |
|
486
|
|
|
* |
|
487
|
|
|
* @return array|boolean The attribute option value instance |
|
488
|
|
|
*/ |
|
489
|
|
|
public function getEavAttributeOptionValueByOptionValueAndStoreId($value, $storeId) |
|
490
|
|
|
{ |
|
491
|
|
|
return $this->getEavAttributeOptionValueRepository()->findEavAttributeOptionValueByOptionValueAndStoreId($value, $storeId); |
|
|
|
|
|
|
492
|
|
|
} |
|
493
|
|
|
|
|
494
|
|
|
/** |
|
495
|
|
|
* Load's and return's a raw entity without primary key but the mandatory members only and nulled values. |
|
496
|
|
|
* |
|
497
|
|
|
* @param string $entityTypeCode The entity type code to return the raw entity for |
|
498
|
|
|
* @param array $data An array with data that will be used to initialize the raw entity with |
|
499
|
|
|
* |
|
500
|
|
|
* @return array The initialized entity |
|
501
|
|
|
*/ |
|
502
|
|
|
public function loadRawEntity($entityTypeCode, array $data = array()) |
|
503
|
|
|
{ |
|
504
|
|
|
return $this->getRawEntityLoader()->load($entityTypeCode, $data); |
|
|
|
|
|
|
505
|
|
|
} |
|
506
|
|
|
|
|
507
|
|
|
/** |
|
508
|
|
|
* Load's the product relation with the passed parent/child ID. |
|
509
|
|
|
* |
|
510
|
|
|
* @param integer $parentId The entity ID of the product relation's parent product |
|
511
|
|
|
* @param integer $childId The entity ID of the product relation's child product |
|
512
|
|
|
* |
|
513
|
|
|
* @return array The product relation |
|
514
|
|
|
*/ |
|
515
|
|
|
public function loadProductRelation($parentId, $childId) |
|
516
|
|
|
{ |
|
517
|
|
|
return $this->getProductRelationRepository()->findOneByParentIdAndChildId($parentId, $childId); |
|
518
|
|
|
} |
|
519
|
|
|
|
|
520
|
|
|
/** |
|
521
|
|
|
* Load's the product super link with the passed product/parent ID. |
|
522
|
|
|
* |
|
523
|
|
|
* @param integer $productId The entity ID of the product super link's product |
|
524
|
|
|
* @param integer $parentId The entity ID of the product super link's parent product |
|
525
|
|
|
* |
|
526
|
|
|
* @return array The product super link |
|
527
|
|
|
*/ |
|
528
|
|
|
public function loadProductSuperLink($productId, $parentId) |
|
529
|
|
|
{ |
|
530
|
|
|
return $this->getProductSuperLinkRepository()->findOneByProductIdAndParentId($productId, $parentId); |
|
531
|
|
|
} |
|
532
|
|
|
|
|
533
|
|
|
/** |
|
534
|
|
|
* Load's the product super attribute with the passed product/attribute ID. |
|
535
|
|
|
* |
|
536
|
|
|
* @param integer $productId The entity ID of the product super attribute's product |
|
537
|
|
|
* @param integer $attributeId The attribute ID of the product super attributes attribute |
|
538
|
|
|
* |
|
539
|
|
|
* @return array The product super attribute |
|
540
|
|
|
*/ |
|
541
|
|
|
public function loadProductSuperAttribute($productId, $attributeId) |
|
542
|
|
|
{ |
|
543
|
|
|
return $this->getProductSuperAttributeRepository()->findOneByProductIdAndAttributeId($productId, $attributeId); |
|
544
|
|
|
} |
|
545
|
|
|
|
|
546
|
|
|
/** |
|
547
|
|
|
* Load's the product super attribute label with the passed product super attribute/store ID. |
|
548
|
|
|
* |
|
549
|
|
|
* @param integer $productSuperAttributeId The product super attribute ID of the product super attribute label |
|
550
|
|
|
* @param integer $storeId The store ID of the product super attribute label |
|
551
|
|
|
* |
|
552
|
|
|
* @return array The product super attribute label |
|
553
|
|
|
*/ |
|
554
|
|
|
public function loadProductSuperAttributeLabel($productSuperAttributeId, $storeId) |
|
555
|
|
|
{ |
|
556
|
|
|
return $this->getProductSuperAttributeLabelRepository()->findOneByProductSuperAttributeIdAndStoreId($productSuperAttributeId, $storeId); |
|
557
|
|
|
} |
|
558
|
|
|
|
|
559
|
|
|
/** |
|
560
|
|
|
* Persist's the passed product relation data and return's the ID. |
|
561
|
|
|
* |
|
562
|
|
|
* @param array $productRelation The product relation data to persist |
|
563
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
|
564
|
|
|
* |
|
565
|
|
|
* @return void |
|
566
|
|
|
*/ |
|
567
|
|
|
public function persistProductRelation($productRelation, $name = null) |
|
568
|
|
|
{ |
|
569
|
|
|
return $this->getProductRelationAction()->persist($productRelation, $name); |
|
570
|
|
|
} |
|
571
|
|
|
|
|
572
|
|
|
/** |
|
573
|
|
|
* Persist's the passed product super link data and return's the ID. |
|
574
|
|
|
* |
|
575
|
|
|
* @param array $productSuperLink The product super link data to persist |
|
576
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
|
577
|
|
|
* |
|
578
|
|
|
* @return void |
|
579
|
|
|
*/ |
|
580
|
|
|
public function persistProductSuperLink($productSuperLink, $name = null) |
|
581
|
|
|
{ |
|
582
|
|
|
return $this->getProductSuperLinkAction()->persist($productSuperLink, $name); |
|
583
|
|
|
} |
|
584
|
|
|
|
|
585
|
|
|
/** |
|
586
|
|
|
* Persist's the passed product super attribute data and return's the ID. |
|
587
|
|
|
* |
|
588
|
|
|
* @param array $productSuperAttribute The product super attribute data to persist |
|
589
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
|
590
|
|
|
* |
|
591
|
|
|
* @return string The ID of the persisted product super attribute entity |
|
592
|
|
|
*/ |
|
593
|
|
|
public function persistProductSuperAttribute($productSuperAttribute, $name = null) |
|
594
|
|
|
{ |
|
595
|
|
|
return $this->getProductSuperAttributeAction()->persist($productSuperAttribute, $name); |
|
596
|
|
|
} |
|
597
|
|
|
|
|
598
|
|
|
/** |
|
599
|
|
|
* Persist's the passed product super attribute label data and return's the ID. |
|
600
|
|
|
* |
|
601
|
|
|
* @param array $productSuperAttributeLabel The product super attribute label data to persist |
|
602
|
|
|
* @param string|null $name The name of the prepared statement that has to be executed |
|
603
|
|
|
* |
|
604
|
|
|
* @return void |
|
605
|
|
|
*/ |
|
606
|
|
|
public function persistProductSuperAttributeLabel($productSuperAttributeLabel, $name = null) |
|
607
|
|
|
{ |
|
608
|
|
|
return $this->getProductSuperAttributeLabelAction()->persist($productSuperAttributeLabel, $name); |
|
609
|
|
|
} |
|
610
|
|
|
} |
|
611
|
|
|
|
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.