Note: The following tutorial requires some fairly good understanding over the Appzio’s infrastructure.
With the Appzio Platform you have the ability to create semi-automated, yet fully functional CRUD interface for your application. Please refer to the following test case in order to get a better understanding on how the system works.
The following example would demonstrate how to build a decent admin interface for a multipurpose Golf application. The current application is using several different tables:
Here is how this looks like in practice:
What’s needed in order achieve this functionality:
'golf-batch' => [ 'class' => 'schmunk42\giiant\commands\BatchController', 'interactive' => false, 'overwrite' => true, 'enableI18N' => true, 'crudTidyOutput' => true, 'crudAccessFilter' => false, // no login required for inner pages 'tablePrefix' => '', 'modelMessageCategory' => 'backend', 'crudMessageCategory' => 'backend', // Do not edit 'crudBaseControllerClass' => 'backend\\controllers\\CrudBaseController', 'modelBaseClass' => 'backend\\models\\CrudBase', // Do not edit // Do configuration here 'modelNamespace' => 'backend\\modules\\golf\\models', 'modelQueryNamespace' => 'backend\\modules\\golf\\models\\query', 'crudControllerNamespace' => 'backend\\modules\\golf\\controllers', 'crudSearchModelNamespace' => 'backend\\modules\\golf\\search', 'crudViewPath' => '@backend/modules/golf/views', 'crudPathPrefix' => '/golf/', ]
'{your_batch_name}' => [ 'class' => 'schmunk42\giiant\commands\BatchController', 'interactive' => false, 'overwrite' => true, 'enableI18N' => true, 'crudTidyOutput' => true, 'crudAccessFilter' => false, // no login required for inner pages 'tablePrefix' => '', 'modelMessageCategory' => 'backend', 'crudMessageCategory' => 'backend', // Do not edit 'crudBaseControllerClass' => 'backend\\controllers\\CrudBaseController', 'modelBaseClass' => 'backend\\models\\CrudBase', // Do not edit // Do configuration here 'modelNamespace' => 'backend\\modules\\{your_application_name}\\models', 'modelQueryNamespace' => 'backend\\modules\\{your_application_name}\\models\\query', 'crudControllerNamespace' => 'backend\\modules\\{your_application_name}\\controllers', 'crudSearchModelNamespace' => 'backend\\modules\\{your_application_name}\\search', 'crudViewPath' => '@backend/modules/{your_application_name}/views', 'crudPathPrefix' => '/{your_application_name}/', ]
./yii {your_batch_name} --tables={table1},{table2},{table3}
./yii golf-batch --tables=ae_ext_golf_hole,ae_ext_golf_hole_user,ae_ext_mobileevents,ae_ext_mobileevents_participants,ae_ext_mobileplaces,ae_location_log
Once the system generates your new custom module, we need to register it with YII so it could become readable. In order to that:
'users' => [ 'class' => 'backend\modules\users\Users', ],
The system allows you to control the Left navigation bar and the User’s filters of your admin using .json config files. The file itself should be named as your application’s Config identifier, available in the App Dashboard ( example: 273380e054fa80a2733cd9bbc6ec3c3e ). All files need to be placed in the following directory: appzioUI/backend/components/configs. If a configuration file is not defined, the system would be using the default default-config.json configuration.
Below you could find a basic configuration file:
{ "menus": { "usergroups-user": { "label": "Users", "icon": "user-o", "url": [ "/users/usergroups-user" ] } }, "filter_vars": { "name": { "label": "Name", "type": "input", "match": "loose_match", "location": "variables" }, "email": { "label": "Email", "type": "input", "match": "loose_match", "location": "variables" }, "gender": { "label": "Gender", "type": "select", "match": "exact_match", "values": [ "", "man", "woman", "male", "female" ], "location": "variables" }, "reg_phase": { "label": "Registration Status", "type": "select", "match": "reg_options", "values": [ "", "complete", "not complete" ], "location": "variables" }, "flag": { "label": "Reported", "type": "select", "match": "matching_options", "values": [ "", "yes", "no" ], "location": "mobilematching" } } }