Frustrated by Magento? Then you’ll love Commerce Bug, the must have debugging extension for anyone using Magento. Whether you’re just starting out or you’re a seasoned pro, Commerce Bug will save you and your team hours everyday. Grab a copy and start working with Magento instead of against it.

Updated for Magento 2! No Frills Magento Layout is the only Magento
front end book you'll ever need. Get your copy
today!

A new release of pestle, my PHP command line framework with a full compliment of Magento 2 code generation commands, is available for download. New users will find all they need in the GitHub README.md. Existing users can just run selfupdate

This code generates the base columns any AbstractModel based class in Magento 2 needs, plus a title column as an example for programmers. Until pestle 1.3, programmers would need to manually add columns to this file.

Now, with pestle 1.3, you can use the magento2:generate:ui:add-schema-column to add a column to any PHP source file with a newTable method call.

->newTable(
$installer->getTable('...')
)->

For example, if we needed another date column in the above InstallSchema.php file, we’d run

This command involves parsing the actual PHP code used in whatever file you’re adding to. If the parser can’t find the code you’re looking for (user error or parser error), pestle will output the addColumn code so you may manually add it to your file

Grids and Forms

Previous versions of Pestle had commands for generating an adminhtml UI grid and UI form for your models, as well as the magento2:generate:full-module command, which outputs every pestle command you’d need for a “full module”.

However, before pestle 1.3, grids defaulted to a single ID column, and forms to a single text column. With pestle 1.3, you can add new text columns to your grid with the magento2:generate:ui:add-column-text

Like all pestle commands, you can run each of these in interactive or non-interactive/argument mode.

With these new additions, it’s now possible to create your Magento 2 module interactively without writing a single line of code yourself. Next steps for pestle are to start adding non-text column-and-field types to the generation routines — if you have opinions about that please let us know via the GitHub Issues. Pestle is still young enough that we’ll be able to take your ideas and turn them into working code by the next release.