|
@@ -33,47 +33,13 @@ class DeleteRessourceDataProvider extends BaseDataProvider
|
|
|
public function delete()
|
|
public function delete()
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
- /**
|
|
|
|
|
- * hosting id
|
|
|
|
|
- */
|
|
|
|
|
- $hid = $this->request->get('id');
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- * product manager allow to check product settings
|
|
|
|
|
- */
|
|
|
|
|
- $productManager = new ProductManager();
|
|
|
|
|
- $productManager->loadByHostingId($hid);
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- *
|
|
|
|
|
- * get soap create domain service
|
|
|
|
|
- */
|
|
|
|
|
- $service =(new KerioManager())
|
|
|
|
|
- ->getApiByHosting($hid)
|
|
|
|
|
- ->soap
|
|
|
|
|
- ->service()
|
|
|
|
|
- ->deleteRessource();
|
|
|
|
|
- /**
|
|
|
|
|
- *
|
|
|
|
|
- * set product manager & form data to service
|
|
|
|
|
- */
|
|
|
|
|
- $service
|
|
|
|
|
- ->setFormData($this->formData);
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- *
|
|
|
|
|
- * run service
|
|
|
|
|
- */
|
|
|
|
|
- $result = $service->run();
|
|
|
|
|
-
|
|
|
|
|
- /**
|
|
|
|
|
- *
|
|
|
|
|
- * return success or error response
|
|
|
|
|
- */
|
|
|
|
|
- if(!$result)
|
|
|
|
|
- {
|
|
|
|
|
- return (new HtmlDataJsonResponse())->setMessageAndTranslate($service->getError())->setStatusError();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ logModuleCall(
|
|
|
|
|
+ 'kerioEmail',
|
|
|
|
|
+ __FUNCTION__,
|
|
|
|
|
+ $this->formData,
|
|
|
|
|
+ 'Debug Data',
|
|
|
|
|
+ $this->data
|
|
|
|
|
+ );
|
|
|
|
|
|
|
|
return (new HtmlDataJsonResponse())->setMessageAndTranslate('ressourceHasBeenDeleted')->setStatusSuccess();
|
|
return (new HtmlDataJsonResponse())->setMessageAndTranslate('ressourceHasBeenDeleted')->setStatusSuccess();
|
|
|
|
|
|