If 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.