web_user_id = AUserController::getWebUserId(); $this->customer_id = UCustomerLoginController::getLoggedInCustomerId(); $this->item_type = $item_type; $this->item_id = $item_id; parent::__construct(new UserUploadModel($this->web_user_id, $this->customer_id, $item_type, $item_id)); } protected function deleteFileBeforeDeleteItem($item_id): bool { // delete thumb files $item_info = $this->getInfo($item_id); if($item_info['file_path']) { $file_local_path = PUBLIC_DIR . "/". $item_info['file_path']; @unlink($file_local_path); } // ok return true; } }