Start Point al 2026
This commit is contained in:
commit
8a76e1db3b
371 files changed
+160283
No files matched your search
@@ -0,0 +1,57 @@
|
||||
<?php namespace App\Controllers;
|
||||
|
||||
use App\Libraries\Crud;
|
||||
|
||||
|
||||
class Categorie extends CRUDController {
|
||||
|
||||
// Tab: Categorie = ['caIDcategoria', 'caCode', 'caNome', 'caDescrizione'];
|
||||
|
||||
protected $crud;
|
||||
|
||||
function __construct() {
|
||||
|
||||
$params = [
|
||||
'table' => 'Categorie',
|
||||
'dev' => false,
|
||||
'fields' => $this->field_options(),
|
||||
'form_title_add' => 'Add Categoria',
|
||||
'form_title_update' => 'Edit Categoria',
|
||||
'form_submit' => 'Add',
|
||||
'table_title' => 'Pagina per la tabella Categorie',
|
||||
'form_submit_update' => 'Update',
|
||||
'base' => '',
|
||||
'UpdatedAt' => '',
|
||||
'DeletedAt' => '',
|
||||
];
|
||||
|
||||
$this->crud = new Crud($params, service('request'));
|
||||
}// __construct
|
||||
|
||||
|
||||
protected function field_options() {
|
||||
|
||||
$fields = [];
|
||||
$fields['caIDcategoria'] = ['label' => 'ID', 'helper' => 'Identificativo univoco del record nel database'];
|
||||
$fields['caCode'] = ['label' => 'Code', 'helper' => 'Codice della categoria (2 caratteri)', 'required' => true];
|
||||
$fields['caNome'] = ['label' => 'Nome', 'helper' => 'Nome della categoria (max 32 caratteri)', 'required' => true];
|
||||
$fields['caDescrizione'] = ['label' => 'Descrizione', 'helper' => 'Descrizione esaustiva della categoria','required' => true];
|
||||
|
||||
return $fields;
|
||||
}// field_options
|
||||
|
||||
|
||||
public function index() { return $this->CRUD_view(['caIDcategoria', 'caCode', 'caNome', 'caDescrizione']); }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
// Auto CRUD terminato
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user