Denno
Denno

Reputation: 2168

In PhpStorm, can I create a new "module" (i.e. handful of files at the same time)

I would like to be able to right click in a folder in PhpStorm, and select something like, "New Custom Module", which will then create directories and files as per a definition that I set up somewhere.

Is this possible at all?

Detailed description of what I would do: In the "Edit File Templates" window (or something similar), I would add a new entry, calling it "New Custom Module". I would then +/- directories and file types that I would like to be created when I select to create that module. For example, I could set up the "New Custom Module" to create a Controllers directory with a controller class inside it, a Model directory with a model class inside it, a composer.json file and a registration.php file. So when selecting this menu option from right clicking on a directory in the Project panel, I would get the following:

[top-level-directory]
 - Controllers
   - People.php
 - Models
   - Person.php
 - composer.json
 - registration.php

Ideally I could also select what the starting contents of the files would be, but if I can just create blank file/directories for now, that would be pretty great

Upvotes: 0

Views: 86

Answers (1)

Dmitrii
Dmitrii

Reputation: 3557

Closest you can get is a "Project template" (saving project as a template). But unfortunately there's nothing similar to what you're requesting. There's an existing feature request for this: https://youtrack.jetbrains.com/issue/IDEA-91565. Feel free to vote/comment.

Upvotes: 1

Related Questions