MVC - Telling PHPStorm Templates About Controllers

Hi Guys,

I'm wondering if you can help me.

I have a custom framework whereby we have controllers and templates (Both PHP).
Controllers: /path/to/controller.def
Templates: /different/path/to/controller.template

The template/controllers live in different folders. They have the same filename excluding the extension (.def/.template).

Is there any way to tell PHPStorm to take into account the controller when editing a template file so it knows what has been defined?

(We have a template class which then loads the template from a certain point in the controller using $Template->init() - but this is usually at the bottom of the controller anyway, so simply "including" the controller before the template in the mind of PHPStorm should suffice).

Thanks.

Please sign in to leave a comment.