1 | <?php |
||
38 | class ClearUrlRewriteObserver extends AbstractCategoryImportObserver |
||
39 | { |
||
40 | |||
41 | /** |
||
42 | * The product URL rewrite processor instance. |
||
43 | * |
||
44 | * @var \TechDivision\Import\Category\Services\CategoryUrlRewriteProcessorInterface |
||
45 | */ |
||
46 | protected $categoryUrlRewriteProcessor; |
||
47 | |||
48 | /** |
||
49 | * Initialize the observer with the passed category URL rewrite processor instance. |
||
50 | * |
||
51 | * @param \TechDivision\Import\Category\Services\CategoryUrlRewriteProcessorInterface $categoryUrlRewriteProcessor The category URL rewrite processor instance |
||
52 | */ |
||
53 | public function __construct(CategoryUrlRewriteProcessorInterface $categoryUrlRewriteProcessor) |
||
57 | |||
58 | /** |
||
59 | * Return's the category URL rewrite processor instance. |
||
60 | * |
||
61 | * @return \TechDivision\Import\Category\Services\CategoryUrlRewriteProcessorInterface The category URL rewrite processor instance |
||
62 | */ |
||
63 | protected function getCategoryUrlRewriteProcessor() |
||
67 | |||
68 | /** |
||
69 | * Process the observer's business logic. |
||
70 | * |
||
71 | * @return array The processed row |
||
72 | */ |
||
73 | protected function process() |
||
100 | |||
101 | /** |
||
102 | * Return's the category with the passed ID. |
||
103 | * |
||
104 | * @param string $id The ID of the category to return |
||
105 | * |
||
106 | * @return array The category |
||
107 | */ |
||
108 | protected function loadCategory($id) |
||
112 | |||
113 | /** |
||
114 | * Delete's the URL rewrite(s) with the passed attributes. |
||
115 | * |
||
116 | * @param array $row The attributes of the entity to delete |
||
117 | * @param string|null $name The name of the prepared statement that has to be executed |
||
118 | * |
||
119 | * @return void |
||
120 | */ |
||
121 | protected function deleteUrlRewrite($row, $name = null) |
||
125 | } |
||
126 |