1 | <?php |
||
36 | class ProductAttributeObserver extends AbstractProductImportObserver |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The ID of the attribute to create the values for. |
||
41 | * |
||
42 | * @var integer |
||
43 | */ |
||
44 | protected $attributeId; |
||
45 | |||
46 | /** |
||
47 | * The attribute code of the attribute to create the values for. |
||
48 | * |
||
49 | * @var string |
||
50 | */ |
||
51 | protected $attributeCode; |
||
52 | |||
53 | /** |
||
54 | * The backend type of the attribute to create the values for. |
||
55 | * |
||
56 | * @var string |
||
57 | */ |
||
58 | protected $backendType; |
||
59 | |||
60 | /** |
||
61 | * The attribute value to process. |
||
62 | * |
||
63 | * @var mixed |
||
64 | */ |
||
65 | protected $attributeValue; |
||
66 | |||
67 | /** |
||
68 | * Process the observer's business logic. |
||
69 | * |
||
70 | * @return void |
||
71 | */ |
||
72 | protected function process() |
||
148 | |||
149 | /** |
||
150 | * Prepare the attributes of the entity that has to be persisted. |
||
151 | * |
||
152 | * @return array The prepared attributes |
||
153 | */ |
||
154 | protected function prepareAttributes() |
||
193 | |||
194 | /** |
||
195 | * Initialize the category product with the passed attributes and returns an instance. |
||
196 | * |
||
197 | * @param array $attr The category product attributes |
||
198 | * |
||
199 | * @return array The initialized category product |
||
200 | */ |
||
201 | protected function initializeAttribute(array $attr) |
||
205 | |||
206 | /** |
||
207 | * Return's the PK to create the product => attribute relation. |
||
208 | * |
||
209 | * @return integer The PK to create the relation with |
||
210 | */ |
||
211 | protected function getPrimaryKey() |
||
215 | |||
216 | /** |
||
217 | * Set's the attribute value to process. |
||
218 | * |
||
219 | * @param mixed $attributeValue The attribute value |
||
220 | * |
||
221 | * @return void |
||
222 | */ |
||
223 | protected function setAttributeValue($attributeValue) |
||
227 | |||
228 | /** |
||
229 | * Return's the attribute value to process. |
||
230 | * |
||
231 | * @return mixed The attribute value |
||
232 | */ |
||
233 | protected function getAttributeValue() |
||
237 | |||
238 | /** |
||
239 | * Set's the backend type of the attribute to create the values for. |
||
240 | * |
||
241 | * @param string $backendType The backend type |
||
242 | * |
||
243 | * @return void |
||
244 | */ |
||
245 | protected function setBackendType($backendType) |
||
249 | |||
250 | /** |
||
251 | * Return's the backend type of the attribute to create the values for. |
||
252 | * |
||
253 | * @return string The backend type |
||
254 | */ |
||
255 | protected function getBackendType() |
||
259 | |||
260 | /** |
||
261 | * Set's the attribute code of the attribute to create the values for. |
||
262 | * |
||
263 | * @param string $attributeCode The attribute code |
||
264 | * |
||
265 | * @return void |
||
266 | */ |
||
267 | protected function setAttributeCode($attributeCode) |
||
271 | |||
272 | /** |
||
273 | * Return's the attribute code of the attribute to create the values for. |
||
274 | * |
||
275 | * @return string The attribute code |
||
276 | */ |
||
277 | protected function getAttributeCode() |
||
281 | |||
282 | /** |
||
283 | * Set's the ID of the attribute to create the values for. |
||
284 | * |
||
285 | * @param integer $attributeId The attribute ID |
||
286 | * |
||
287 | * @return void |
||
288 | */ |
||
289 | protected function setAttributeId($attributeId) |
||
293 | |||
294 | /** |
||
295 | * Return's the ID of the attribute to create the values for. |
||
296 | * |
||
297 | * @return integer The attribute ID |
||
298 | */ |
||
299 | protected function getAttributeId() |
||
303 | |||
304 | /** |
||
305 | * Map the passed attribute code, if a header mapping exists and return the |
||
306 | * mapped mapping. |
||
307 | * |
||
308 | * @param string $attributeCode The attribute code to map |
||
309 | * |
||
310 | * @return string The mapped attribute code, or the original one |
||
311 | */ |
||
312 | protected function mapAttributeCodeByHeaderMapping($attributeCode) |
||
316 | |||
317 | /** |
||
318 | * Return's the array with callbacks for the passed type. |
||
319 | * |
||
320 | * @param string $type The type of the callbacks to return |
||
321 | * |
||
322 | * @return array The callbacks |
||
323 | */ |
||
324 | protected function getCallbacksByType($type) |
||
328 | |||
329 | /** |
||
330 | * Return's mapping for the supported backend types (for the product entity) => persist methods. |
||
331 | * |
||
332 | * @return array The mapping for the supported backend types |
||
333 | */ |
||
334 | protected function getBackendTypes() |
||
338 | |||
339 | /** |
||
340 | * Return's the attributes for the attribute set of the product that has to be created. |
||
341 | * |
||
342 | * @return array The attributes |
||
343 | * @throws \Exception |
||
344 | */ |
||
345 | protected function getAttributes() |
||
349 | |||
350 | /** |
||
351 | * Return's the store ID of the actual row, or of the default store |
||
352 | * if no store view code is set in the CSV file. |
||
353 | * |
||
354 | * @param string|null $default The default store view code to use, if no store view code is set in the CSV file |
||
355 | * |
||
356 | * @return integer The ID of the actual store |
||
357 | * @throws \Exception Is thrown, if the store with the actual code is not available |
||
358 | */ |
||
359 | protected function getRowStoreId($default = null) |
||
363 | |||
364 | /** |
||
365 | * Persist's the passed product varchar attribute. |
||
366 | * |
||
367 | * @param array $attribute The attribute to persist |
||
368 | * |
||
369 | * @return void |
||
370 | */ |
||
371 | protected function persistProductVarcharAttribute($attribute) |
||
375 | |||
376 | /** |
||
377 | * Persist's the passed product integer attribute. |
||
378 | * |
||
379 | * @param array $attribute The attribute to persist |
||
380 | * |
||
381 | * @return void |
||
382 | */ |
||
383 | protected function persistProductIntAttribute($attribute) |
||
387 | |||
388 | /** |
||
389 | * Persist's the passed product decimal attribute. |
||
390 | * |
||
391 | * @param array $attribute The attribute to persist |
||
392 | * |
||
393 | * @return void |
||
394 | */ |
||
395 | protected function persistProductDecimalAttribute($attribute) |
||
399 | |||
400 | /** |
||
401 | * Persist's the passed product datetime attribute. |
||
402 | * |
||
403 | * @param array $attribute The attribute to persist |
||
404 | * |
||
405 | * @return void |
||
406 | */ |
||
407 | protected function persistProductDatetimeAttribute($attribute) |
||
411 | |||
412 | /** |
||
413 | * Persist's the passed product text attribute. |
||
414 | * |
||
415 | * @param array $attribute The attribute to persist |
||
416 | * |
||
417 | * @return void |
||
418 | */ |
||
419 | protected function persistProductTextAttribute($attribute) |
||
423 | } |
||
424 |
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.