Add delete action and enhance logging in LicenzeController
Introduced a new deleteAction method in LicenzeController to handle deletion functionality. Updated the logging mechanism in inserimentoRecordDiLog to capture additional details, enhancing the audit trail for licensing changes. Removed the deprecated afterDeleteElement method.
This commit is contained in:
@@ -9,6 +9,11 @@ class V1_LicenzeController extends App_Controller_Rest_Controller
|
|||||||
parent::init();
|
parent::init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function deleteAction()
|
||||||
|
{
|
||||||
|
$this->disableCallAction();
|
||||||
|
}
|
||||||
|
|
||||||
//-----------------------------------------------
|
//-----------------------------------------------
|
||||||
|
|
||||||
public function switchMethodFunction($method)
|
public function switchMethodFunction($method)
|
||||||
@@ -33,21 +38,14 @@ class V1_LicenzeController extends App_Controller_Rest_Controller
|
|||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function afterDeleteElement($id): void
|
|
||||||
{
|
|
||||||
$record = $this->_genericModel->getRecordById($this->_resourceName, $id);
|
|
||||||
$this->inserimentoRecordDiLog($record, 'Eliminazione');
|
|
||||||
}
|
|
||||||
|
|
||||||
private function inserimentoRecordDiLog($data, $op)
|
private function inserimentoRecordDiLog($data, $op)
|
||||||
{
|
{
|
||||||
/*$this->_genericModel->insert('LogLicenze', [
|
$this->_genericModel->insert('LogLicenze', [
|
||||||
'Operazione' => $op,
|
'Descrizione' => $op,
|
||||||
'Data' => date('Y-m-d H:i:s'),
|
'IdentificativoPC' => $data['IdentificativoPC'],
|
||||||
'Utente' => $this->_authInfo->getIdentity(),
|
'PartitaIva' => $data['PartitaIva'],
|
||||||
'Descrizione' => '',
|
'CodiceFiscale' => $data['CodiceFiscale']
|
||||||
'IdElemento' => ''
|
]);
|
||||||
]);*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}//END CLASS
|
}//END CLASS
|
||||||
|
|||||||
Reference in New Issue
Block a user