Files
GestioneSpiaggia.it/application/modules/v1/controllers/LicenzeController.php
T
giacomo 03c267a1b2 Update log messages in LicenzeController for clarity
Revised log message parameters in `afterInsertElement` and `afterUpdateElement` to provide more descriptive context. This improves the clarity and understanding of logged events.
2025-05-16 09:29:26 +02:00

52 lines
1.2 KiB
PHP

<?php
class V1_LicenzeController extends App_Controller_Rest_Controller
{
public function init()
{
$this->_resourceName = 'Licenze';
parent::init();
}
public function deleteAction()
{
$this->disableCallAction();
}
//-----------------------------------------------
public function switchMethodFunction($method)
{
switch ($method) {
default:
$this->defaultGetList();
break;
}
}
public function afterInsertElement($data)
{
// Inserimento record di Log
$this->inserimentoRecordDiLog($data, 'Inserimento dati licenza');
return $data;
}
public function afterUpdateElement($data)
{
$this->inserimentoRecordDiLog($data, 'Inserimento dati licenza');
return $data;
}
private function inserimentoRecordDiLog($data, $op)
{
$this->_genericModel->insert('LogLicenze', [
'Descrizione' => $op,
'IdentificativoPC' => $data['IdentificativoPC'],
'PartitaIva' => $data['PartitaIva'],
'CodiceFiscale' => $data['CodiceFiscale']
]);
}
}//END CLASS