0

I LOVE PHPStorm. However, I'm looking to take the 'PHP Class' file template, and essentially add a custom field in the creation for 'Extended Class'. I see no way to do this.

Is this possible?

Thanks in advance.

EDIT2: I asked a follow up but then figured it out by tinkering with it. My original question remains, however.

3
  • Do you mean actual file template .. or dialog window? Commented Feb 18, 2015 at 22:24
  • Eh... both? I'd like to make it so that the dialog window that appears when using a PHP template (i.e. 'PHP Class') has an input for 'Extended Class' as well as the other predefined inputs. I'd prefer to override the PHP Class template, but I noticed that doing so removes a lot of the other inputs that were in the predefined template. Does that make sense? Commented Feb 18, 2015 at 22:35
  • "I'd prefer to override the PHP Class template, but I noticed that doing so removes a lot of the other inputs that were in the predefined template. Does that make sense?" Example please (screenshots/file templates). What exactly gets missing? Commented Feb 18, 2015 at 23:33

1 Answer 1

1
  1. You cannot extend dialog window .. unless, maybe, via custom plugin (which has to be written in Java).

  2. You can easily customize actual file template by adding new or removing existing elements -- Settings | Editor | File and Code Templates | Templates --> PHP Class. You can add any static text, use standard/built-in variables or perform some manipulations on values from built-in variables ... but any custom variables will be ignored (as dialog does not ask for their values).

  3. Create and use separate file template -- this way IDE will ask for values for those additional variables. Unfortunately functionality of "New PHP Class" dialog window (like sync name space/file name editing etc) are not available here as it will be a completely different dialog.

P.S. Some related tickets:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.