3 ms·
The generated code is "pure" PHP. You have a controller for create, edit, list and delete. You can modify the controllers without problems and extend the functi
by jonseg 12y ago
The generated code is "pure" PHP. You have a controller for create, edit, list and delete. You can modify the controllers without problems and extend the functionalities. You can hide fields, add new ones, implement an upload images/files system...
The used framework is Silex (http://silex.sensiolabs.org/ http://silex.sensiolabs.org/)
Thank you.
- gnud 12y agoIs there a good split between generated/edited code? Or do I have to change the generated code? Also, can I regenerate only parts of the interface (after changes to the database, for instance)?
- jiggy2011 12y agoIf I understand, the approach that you are taking is that code is generated for the admin using the generator and then you would do modifications afterwards? What happens in such a case that the code is modified and then you run the generator again? An alternative approach would be to supply custom classes to the generator at the time that it generates. For example. Class CustomerTable extends AdminTable { $hiddenfields = [ "created_date" , "password" ]; $validation = [ "email" => "validateEmail"]; function validateEmail($validate_data) { return validEmailAddress($validate_data); } } Then the user can place this class somewhere specific or register it with the generator in some way, and when the generator runs it will use this class and not overwrite changes. Like $adminGenerator->use("customer","CustomerTable"); This way you can keep using the generator even after you have done extensive modification to the tables and code.