Easier coding with PHPStorm templates
If you're using PHPStorm or Intellij IDEA you might know, that you can use some templates to ease your work. E.g type "db" and you get the whole "private static $db = [];" thingie. Did you know you can share your templates, so others can also enjoy them?
Well, you can, as this post states, export those live templates to XML. And you can create file templates from files. Easy, isn't it?
This post might be a collection of templates we find useful:
- Live templates for db, has_one, etc, but also field_labels, getCMSFields and other useful stuff by Martijn
- File Template for Dataobject and Page / Page_Controller by Werner
Feel free to play around and improve those templates. Do you have other useful tipps for easier creation of modules, classes or methods you want to share? Leave a comment and we can update this post.
Post your comment
Comments
Werner Krauss 08/10/2020 2:45pm (4 years ago)
Update 2020: https://github.com/northcreation-agency/silverstripe-php-web-storm-live-templates has a curated set of live templates
Werner Krauss 13/07/2016 10:58am (9 years ago)
There is also https://github.com/studiobonito/phpstorm-templates-silverstripe around for some time.
No one has commented on this page yet.
RSS feed for comments on this page | RSS feed for all comments