[eluser]MikeHibbert[/eluser]
Ok I have create the beginnings of the yaml based system
First off you still call the generator in the normal way:
Code:
php crud/create [options] [table] [fieldnames]
But this time the create will make a yml file and build you the forms from that.
The file is created as 'crud/formDefs/tablename.yml' and takes the form of:
Code:
---
tablename:
fieldname:
- field type
fieldname:
- field type
so far you can add the normal fields like text, textarea, radio, checkbox and a 'special' feild that can contain code for the times when you wanna add things like '<?=fckEditor?>' instead of a textarea.
I havent put a file field in but it wouldnt be too hard to add it if you need it asap, I will post it again once its in there.
One last thing! if you want to start from scratch you need to delte the yml file and run the command again, or else it wont get over written. Also to update the views you can just run the command with the 'v' option or simple re-run the old command wich will create all but apply whats in the yml to your views.
Have a play around with this and please leave feedback or suggestions if you feel inclined.
I've left a text yml in the formDefs folder for you to look at too its called 'poo.yml', (I thought I would keep with the CRUD theme
)
Mike