1 | <?php |
||
36 | class ProductWebsiteObserver extends AbstractProductImportObserver |
||
37 | { |
||
38 | |||
39 | /** |
||
40 | * The actual website code that has to be processed. |
||
41 | * |
||
42 | * @var string |
||
43 | */ |
||
44 | protected $code; |
||
45 | |||
46 | /** |
||
47 | * Set's the actual website code that has to be processed. |
||
48 | * |
||
49 | * @param string $code The website code |
||
50 | * |
||
51 | * @return void |
||
52 | */ |
||
53 | protected function setCode($code) |
||
57 | |||
58 | /** |
||
59 | * Return's the webiste code that has to be processed. |
||
60 | * |
||
61 | * @return string The website code |
||
62 | */ |
||
63 | protected function getCode() |
||
67 | |||
68 | /** |
||
69 | * Process the observer's business logic. |
||
70 | * |
||
71 | * @return array The processed row |
||
72 | */ |
||
73 | 1 | protected function process() |
|
104 | |||
105 | /** |
||
106 | * Prepare the attributes of the entity that has to be persisted. |
||
107 | * |
||
108 | * @return array The prepared attributes |
||
109 | */ |
||
110 | protected function prepareAttributes() |
||
127 | |||
128 | /** |
||
129 | * Initialize the product website with the passed attributes and returns an instance. |
||
130 | * |
||
131 | * @param array $attr The product website attributes |
||
132 | * |
||
133 | * @return array The initialized product website |
||
134 | * @throws \RuntimeException Is thrown, if the attributes can not be initialized |
||
135 | */ |
||
136 | protected function initializeProductWebsite(array $attr) |
||
140 | |||
141 | /** |
||
142 | * Persist's the passed product website data and return's the ID. |
||
143 | * |
||
144 | * @param array $productWebsite The product website data to persist |
||
145 | * |
||
146 | * @return void |
||
147 | */ |
||
148 | protected function persistProductWebsite($productWebsite) |
||
152 | |||
153 | /** |
||
154 | * Return's the store website for the passed code. |
||
155 | * |
||
156 | * @param string $code The code of the store website to return the ID for |
||
157 | * |
||
158 | * @return integer The store website ID |
||
159 | */ |
||
160 | protected function getStoreWebsiteIdByCode($code) |
||
164 | } |
||
165 |