Get current controller, action and module

In Yii 1 we used the following to get the current controller, action and module:


Yii::app()->controller->id

Yii::app()->controller->action->id

Yii::app()->controller->module

Which are the equivalents for Yii 2?

It’s the same except app() is $app now

great, you’re right!