G
G
Gangg2018-12-20 12:27:20
phpstorm
Gangg, 2018-12-20 12:27:20

How to auto-inherit Yii classes in PhpStorm?

Can you please tell me how to make automatic inheritance of Yii classes in PhpStorm?
For example, there is a project based on the Yii framework. I am creating a controller TestController.php
PhpStorm automatically inserts code like this

<?php

namespace app\controllers;


class TestController
{

}

And I want to put this
<?php

namespace app\controllers;

use yii\web\Controller;


class TestController extends Controller
{

}

Tell me how to do this?
ps Yiistorm plugin installed

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Decadal, 2018-12-20
@Decadal

And how does the storm know what class you want to inherit? maybe you have your own base class that you have already inherited from the framework?
I think such a feature will be delivered with a cognitive interface, except perhaps

M
Maxim Timofeev, 2018-12-20
@webinar

This is only possible with a set of artificial intelligence, and even with the prediction function. How can anyone know from which class you plan to inherit your class?
But PS has templates where you can customize your own, which will create a file with any content.
There is also a gii that generates the correct controller, which can also be customized to your liking.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question