Is there a way to define folder templates?
I'm using PhpStorm for Drupal development and it would be great if I could define a template that would setup the appropriate folder and files for a Drupal module. The desired end result would be the following:
- Right-click on a folder and select New -> Drupal Module
- Enter the name of the Drupal module (e.g. "mymodule")
- PhpStorm would create the following:
- Folder named "mymodule"
- PHP file named "mymodule.module"
- Module info file named "mymodule.info"
Is there a way to do this with PhpStorm already or should I file a feature request?
Thanks,
Shawn.
Please sign in to leave a comment.
Hi Shawn,
There is no such functionality available in PhpStorm ... and I do not think it's going to be implemented any time soon (as this is Drupal-specific feature, I guess).
You can see what is currently planned for future versions here: http://confluence.jetbrains.net/pages/viewpage.action?pageId=15801728
Existing ticket for Drupal support: http://youtrack.jetbrains.net/issue/WI-6404?projectKey=WI
Thanks Andriy,
I think this may be similar to the "Project Template" feature that is being investigated. I don't consider this to be a Drupal specific feature, but a more generic feature that allows you to define and generate an arbitrary set of files and folders.
I know this post is ancient, but this would be super useful for Polymer. Does anyone know if there is any news on this feature in the last 3 years?
For now I have written a batch file that resides in my /templates/ folder.
So now I can just open the terminal and type "create my-new-template" and it does the rest.
AFAIK -- No
Related tickets:
I have updated my batch file. It now scans files for a ${NAME} variable and replaces each instance with the specified name. Currently, the bat file is hard-coded to match a Polymer file structure, but it is very easy to modify.
Here it is on Github if anyone is interested: https://github.com/ScottBeeson/polyclone