. */ include_once __DIR__.'/../../core.php'; use Modules\FileAdapters\FileAdapter; switch (filter('op')) { case 'add': $adapter = new FileAdapter(); $adapter->name = post('name'); $adapter->class = '\\Modules\\FileAdapters\\Adapters\\'.post('class'); $adapter->save(); $id_record = $adapter->id; flash()->info(tr('Nuoovo adattatore aggiunto!')); break; case 'update': $adapter->name = post('name'); $adapter->class = '\\Modules\\FileAdapters\\Adapters\\'.post('class'); $adapter->options = post('options'); $adapter->is_default = post('is_default'); $adapter->save(); flash()->info(tr('Adattatore modificato correttamente!')); break; case 'delete': $adapter->delete(); break; }