Blog: PHP, Python, Linux, Web services & Continuous delivery

Zend Framework 2 helper plugin for Sublime Text 2

I started writing a plug-in for SublimeText 2 to speed up the development of Zend Framework 2 (ZF2) applications called ZF2Helper. So far I've implemented a couple of features and I intend to add more as and when I come across a ZF2 task that would benefit from some automation. Below is a quick example of using ZF2Helper to create new ZF2 modules and new controller actions. The full source is available on github: https://github.com/pipe-devnull/ZF2Helper and the package can be installed in Sublime Text 2 using package_control.


Creating ZF2 Modules with ZF2Helper

Create an entirely new ZF2 module with 1 click rather than copying, pasting, renaming all files individually. Much quicker :)

This option is only available in the side bar context menu.

  1. In the side bar, navigate through to the root of the ZF2 modules directory
  2. Right click on the modules folder and select "ZF2Helper > New ZF2 Module"
  3. Input the name of the new module into the prompt
  4. Add the name of the module into the main ZF2 Application configuration file (ApplicationRoot / config / application.config.php)


Creating new modules with the ZF2Helper plugin for Sublime Text 2

Creating New ZF2 controller actions with ZF2Helper

Add a new action to an existing ZF2 controller and create a new view (phtml) file to accompany it.

  1. Open up a ZF2 controller file
  2. Right click in the file where you want to add a new action.
  3. Select "ZF2 - New Controller Action"
  4. Enter the name of the action in the prompt


Creating new modules with the ZF2Helper plugin for Sublime Text 2

See this earlier post for a list of other plugins I use for setting up a rich development environment with Sublime Text 2.

comments powered by Disqus