1 | <?php |
||
37 | class ClearAttributeObserver extends AbstractAttributeImportObserver |
||
38 | { |
||
39 | |||
40 | /** |
||
41 | * The attribute processor instance. |
||
42 | * |
||
43 | * @var \TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface |
||
44 | */ |
||
45 | protected $attributeBunchProcessor; |
||
46 | |||
47 | /** |
||
48 | * Initializes the observer with the passed subject instance. |
||
49 | * |
||
50 | * @param \TechDivision\Import\Subjects\SubjectInterface $subject The observer's subject instance |
||
51 | * @param \TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface $attributeBunchProcessor The attribute bunch processor instance |
||
52 | */ |
||
53 | public function __construct( |
||
64 | |||
65 | /** |
||
66 | * Process the observer's business logic. |
||
67 | * |
||
68 | * @return array The processed row |
||
69 | */ |
||
70 | protected function process() |
||
87 | |||
88 | /** |
||
89 | * Return's the attribute bunch processor instance. |
||
90 | * |
||
91 | * @return \TechDivision\Import\Attribute\Services\AttributeBunchProcessorInterface The attribute bunch processor instance |
||
92 | */ |
||
93 | protected function getAttributeBunchProcessor() |
||
97 | |||
98 | /** |
||
99 | * Load's and return's the EAV attribute with the passed code. |
||
100 | * |
||
101 | * @param string $attributeCode The code of the EAV attribute to load |
||
102 | * |
||
103 | * @return array The EAV attribute |
||
104 | */ |
||
105 | protected function loadAttributeByAttributeCode($attributeCode) |
||
109 | |||
110 | /** |
||
111 | * Delete's the EAV attribute with the passed attributes. |
||
112 | * |
||
113 | * @param array $row The attributes of the EAV attribute to delete |
||
114 | * @param string|null $name The name of the prepared statement that has to be executed |
||
115 | * |
||
116 | * @return void |
||
117 | */ |
||
118 | protected function deleteAttribute($row, $name = null) |
||
122 | } |
||
123 |