1 | <?php |
||
36 | class LinkAttributePositionObserver extends AbstractProductImportObserver |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The link attribute that has to be handled by this observer. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | const ATTRIBUTE_CODE = 'position'; |
||
45 | |||
46 | /** |
||
47 | * The product link attribute ID to persist the the position attribute for. |
||
48 | * |
||
49 | * @var integer |
||
50 | */ |
||
51 | protected $productLinktAttributeId; |
||
52 | |||
53 | /** |
||
54 | * Will be invoked by the action on the events the listener has been registered for. |
||
55 | * |
||
56 | * @param array $row The row to handle |
||
57 | * |
||
58 | * @return array The modified row |
||
59 | * @see \TechDivision\Import\Product\Observers\ImportObserverInterface::handle() |
||
60 | */ |
||
61 | public function handle(array $row) |
||
73 | |||
74 | /** |
||
75 | * Process the observer's business logic. |
||
76 | * |
||
77 | * @return array The processed row |
||
78 | */ |
||
79 | protected function process() |
||
99 | |||
100 | /** |
||
101 | * Prepare the attributes of the entity that has to be persisted. |
||
102 | * |
||
103 | * @return array The prepared attributes |
||
104 | */ |
||
105 | protected function prepareAttributes() |
||
126 | |||
127 | /** |
||
128 | * Temporary persist the product link attribute ID. |
||
129 | * |
||
130 | * @param integer $productLinkAttributeId The product link attribute ID |
||
131 | * |
||
132 | * @return void |
||
133 | */ |
||
134 | protected function setProductLinkAttributeId($productLinkAttributeId) |
||
138 | |||
139 | /** |
||
140 | * Return's the temporary persisted product link attribute ID. |
||
141 | * |
||
142 | * @return integer The product link attribute ID |
||
143 | */ |
||
144 | protected function getProductLinkAttributeId() |
||
148 | |||
149 | /** |
||
150 | * Return's the link attribute for the passed link type ID and attribute code. |
||
151 | * |
||
152 | * @param integer $linkTypeId The link type |
||
153 | * @param string $attributeCode The attribute code |
||
154 | * |
||
155 | * @return array The link attribute |
||
156 | */ |
||
157 | protected function getProductLinkAttribute($linkTypeId, $attributeCode) |
||
161 | |||
162 | /** |
||
163 | * Initialize the product link attribute with the passed attributes and returns an instance. |
||
164 | * |
||
165 | * @param array $attr The product link attribute |
||
166 | * |
||
167 | * @return array The initialized product link attribute |
||
168 | */ |
||
169 | protected function initializeProductLinkAttributeInt(array $attr) |
||
173 | |||
174 | /** |
||
175 | * Load the temporary persisted the last link ID. |
||
176 | * |
||
177 | * @return integer The last link ID |
||
178 | */ |
||
179 | protected function getLastLinkId() |
||
183 | |||
184 | /** |
||
185 | * Return the link type ID for the passed link type code. |
||
186 | * |
||
187 | * @param string $linkTypeCode The link type code to return the link type ID for |
||
188 | * |
||
189 | * @return integer The mapped link type ID |
||
190 | * @throws \Exception Is thrown if the link type code is not mapped yet |
||
191 | */ |
||
192 | protected function mapLinkTypeCodeToLinkTypeId($linkTypeCode) |
||
196 | |||
197 | /** |
||
198 | * Persist's the passed product link attribute int data and return's the ID. |
||
199 | * |
||
200 | * @param array $productLinkAttributeInt The product link attribute int data to persist |
||
201 | * |
||
202 | * @return string The ID of the persisted entity |
||
203 | */ |
||
204 | protected function persistProductLinkAttributeInt($productLinkAttributeInt) |
||
208 | } |
||
209 |
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.