public function renderDelete($id) { // delete items of this module $this->context->moduleCarouselBootstrap3Model->deleteBy(array('page_page_modules_id' => $id)); // delete files for this module $this->loadModule($id); $imageUploader = new \ImageUploader(array(), "module" . $this->moduleName . "/" . $this->module->page_id); $imageUploader->deleteDirectory(); // delete rest of the module parent::renderDelete($id); }