php ezpublish/console generate:bundle:generate
First, we are asked for the namespace. As the vendor, we will use EzSystems as the root namespace. This must of course be changed to whatever identifies you as a vendor (your name, company name, etc). We then choose a preferably unique name for the field type itself, and make the name end with Bundle. I’ve chosen TweetFieldTypeBundle.
Generating the bundle code: OK Checking that the bundle is autoloaded: OK Confirm automatic update of your Kernel [yes]? <enter> Enabling the bundle inside the Kernel: OK Confirm automatic update of the Routing [yes]? no <enter>
Our bundle should have been generated. Navigate to src/EzSystems/EzSystemsTweetBundle, and you should see this structure:
$ ls -l src/EzSystems/TweetFieldTypeBundle Controller DependencyInjection EzSystemsTweetFieldTypeBundle.phphp Resources Tests
Feel free to delete the Controller folder, since we won’t use it in this tutorial. It could have been useful had our field type required an interface of its own.