1 | <?php |
||
36 | class ProductInventoryObserver extends AbstractProductImportObserver |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * Process the observer's business logic. |
||
41 | * |
||
42 | * @return array The processed row |
||
43 | */ |
||
44 | protected function process() |
||
56 | |||
57 | /** |
||
58 | * Prepare the stock status attributes of the entity that has to be persisted. |
||
59 | * |
||
60 | * @return array The prepared stock status attributes |
||
61 | */ |
||
62 | protected function prepareStockStatusAttributes() |
||
83 | |||
84 | /** |
||
85 | * Initialize the stock status with the passed attributes and returns an instance. |
||
86 | * |
||
87 | * @param array $attr The stock status attributes |
||
88 | * |
||
89 | * @return array The initialized stock status |
||
90 | */ |
||
91 | protected function initializeStockStatus(array $attr) |
||
95 | |||
96 | /** |
||
97 | * Prepare the stock item attributes of the entity that has to be persisted. |
||
98 | * |
||
99 | * @return array The prepared stock status item |
||
100 | */ |
||
101 | protected function prepareStockItemAttributes() |
||
129 | |||
130 | /** |
||
131 | * Initialize the stock item with the passed attributes and returns an instance. |
||
132 | * |
||
133 | * @param array $attr The stock item attributes |
||
134 | * |
||
135 | * @return array The initialized stock item |
||
136 | */ |
||
137 | protected function initializeStockItem(array $attr) |
||
141 | |||
142 | /** |
||
143 | * Persist's the passed stock item data and return's the ID. |
||
144 | * |
||
145 | * @param array $stockItem The stock item data to persist |
||
146 | * |
||
147 | * @return void |
||
148 | */ |
||
149 | protected function persistStockItem($stockItem) |
||
153 | |||
154 | /** |
||
155 | * Persist's the passed stock status data and return's the ID. |
||
156 | * |
||
157 | * @param array $stockStatus The stock status data to persist |
||
158 | * |
||
159 | * @return void |
||
160 | */ |
||
161 | protected function persistStockStatus($stockStatus) |
||
165 | |||
166 | /** |
||
167 | * Return's the appings for the table column => CSV column header. |
||
168 | * |
||
169 | * @return array The header stock mappings |
||
170 | */ |
||
171 | protected function getHeaderStockMappings() |
||
175 | } |
||
176 |