1 | <?php |
||
37 | class ClearUrlRewriteObserver extends AbstractProductImportObserver |
||
38 | { |
||
39 | |||
40 | /** |
||
41 | * The product URL rewrite processor instance. |
||
42 | * |
||
43 | * @var \TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface |
||
44 | */ |
||
45 | protected $productUrlRewriteProcessor; |
||
46 | |||
47 | /** |
||
48 | * Initialize the observer with the passed product URL rewrite processor instance. |
||
49 | * |
||
50 | * @param \TechDivision\Import\Product\Services\ProductBunchProcessorInterface $productUrlRewriteProcessor The product URL rewrite processor instance |
||
51 | */ |
||
52 | public function __construct(ProductUrlRewriteProcessorInterface $productUrlRewriteProcessor) |
||
56 | |||
57 | /** |
||
58 | * Return's the product URL rewrite processor instance. |
||
59 | * |
||
60 | * @return \TechDivision\Import\Product\UrlRewrite\Services\ProductUrlRewriteProcessorInterface The product URL rewrite processor instance |
||
61 | */ |
||
62 | protected function getProductUrlRewriteProcessor() |
||
66 | |||
67 | /** |
||
68 | * Process the observer's business logic. |
||
69 | * |
||
70 | * @return array The processed row |
||
71 | */ |
||
72 | protected function process() |
||
83 | |||
84 | /** |
||
85 | * Delete's the URL rewrite(s) with the passed attributes. |
||
86 | * |
||
87 | * @param array $row The attributes of the entity to delete |
||
88 | * @param string|null $name The name of the prepared statement that has to be executed |
||
89 | * |
||
90 | * @return void |
||
91 | */ |
||
92 | protected function deleteUrlRewrite($row, $name = null) |
||
96 | } |
||
97 |