The z4m_codegen module allows to generate CRUD code for managing your custom data in your ZnetDK 4 Mobile Starter Application.
See demonstation at Code Generator page.
This module is published under the version 3 of GPL General Public Licence.
In the code generator form, enter an entity name, for example Book if you want to manage a file of books.
Next, enter the properties of the entity. For a book, they could be a title, a publication date, a summary, the number of pages and so forth.
Finally, choose an icon to display for the generated view, the prefix to use for HTML element identifiers, the App controller name, the SQL table name, the location of the generated code (module or application) and the DAO class to use, then click the Get the code button.
- ZnetDK 4 Mobile version 3.4 or higher,
- A MySQL database is configured to store the application data,
- PHP version 7.4 or higher,
- Add a new subdirectory named
z4m_codegen
within the./engine/modules/
subdirectory of your ZnetDK 4 Mobile starter App, - Copy module's code in the new
./engine/modules/z4m_codegen/
subdirectory, or from your IDE, pull the code from this module's GitHub repository, - Edit the App's
menu.php
located in the./applications/default/app/
subfolder and include themenu.inc
script to add menu item definition for thez4m_codegen
view.
require ZNETDK_MOD_ROOT . '/z4m_codegen/mod/menu.inc';
- Go to the Code Generator menu and generate your CRUD code.
See CHANGELOG.md file.
Your contribution to the ZnetDK 4 Mobile project is welcome. Please refer to the CONTRIBUTING.md file.