1 | <?php |
||
36 | class ProductLinkObserver extends AbstractProductImportObserver |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The artefact type. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | const ARTEFACT_TYPE = 'links'; |
||
45 | |||
46 | /** |
||
47 | * The mapping with the link type codes => column names. |
||
48 | * |
||
49 | * @var array |
||
50 | */ |
||
51 | protected $linkTypeCodeToColumnsMapping = array( |
||
52 | LinkTypeCodes::RELATION => array(ColumnKeys::RELATED_SKUS, ColumnKeys::RELATED_POSITION), |
||
53 | LinkTypeCodes::UP_SELL => array(ColumnKeys::UPSELL_SKUS, ColumnKeys::UPSELL_POSITION), |
||
54 | LinkTypeCodes::CROSS_SELL => array(ColumnKeys::CROSSSELL_SKUS, ColumnKeys::CROSSSELL_POSITION) |
||
55 | ); |
||
56 | |||
57 | /** |
||
58 | * Will be invoked by the action on the events the listener has been registered for. |
||
59 | * |
||
60 | * @param array $row The row to handle |
||
61 | * |
||
62 | * @return array The modified row |
||
63 | * @see \TechDivision\Import\Product\Observers\ImportObserverInterface::handle() |
||
64 | */ |
||
65 | public function handle(array $row) |
||
77 | |||
78 | /** |
||
79 | * Process the observer's business logic. |
||
80 | * |
||
81 | * @return array The processed row |
||
82 | */ |
||
83 | protected function process() |
||
97 | |||
98 | /** |
||
99 | * Prepare's and return's the artefacts for the passed link type. |
||
100 | * |
||
101 | * @param string $linkTypeCode The link type code to prepare the artefacts for |
||
102 | * @param array $columns The column names that contains the data (SKU + position) |
||
103 | * |
||
104 | * @return array The link artefacts assembled from the passed row |
||
105 | */ |
||
106 | protected function prepareArtefacts($linkTypeCode, array $columns) |
||
143 | |||
144 | /** |
||
145 | * Return's the link type code => colums mapping. |
||
146 | * |
||
147 | * @return array The mapping with the link type codes => colums |
||
148 | */ |
||
149 | protected function getLinkTypeCodeToColumnsMapping() |
||
153 | |||
154 | /** |
||
155 | * Add the passed product type artefacts to the product with the |
||
156 | * last entity ID. |
||
157 | * |
||
158 | * @param array $artefacts The product type artefacts |
||
159 | * |
||
160 | * @return void |
||
161 | * @uses \TechDivision\Import\Product\Media\Subjects\MediaSubject::getLastEntityId() |
||
162 | */ |
||
163 | protected function addArtefacts(array $artefacts) |
||
167 | } |
||
168 |
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.