G
G
Grag2014-05-14 09:56:36
Yii
Grag, 2014-05-14 09:56:36

How to properly use beforeControllerAction in Yii?

Hello.
The task is to do

Yii::import('application.modules.user.bla-bla.bla-blaController');

in order to safely inherit a class with access rules and not write them in each controller.
And in order not to do this everywhere, I decided to do it in UserModule.php, but it gives an error, they say, there is no such thing ...
What should I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vit, 2014-05-14
@Grag

If you always need some class, then specify it in the application config in the import section.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question