. . .

Get current Controller & action in Yii

Published: April 3, 2011

 In view file 

$this->uniqueid        (controller name)

$this->action->Id      (action name)

($this is CController instance)

In other files

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

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

Don't forget to share this post

    Let's Build Digital Excellence Together


    • Cost Efficient Solutions.
    • Minimal Timelines.
    • Effective Communication.
    • High Quality Standards.
    • Lifetime Support.
    • Transparent Execution.
    • 24/7 Availability.
    • Scalable Teams.

    Join Our 200+ Happy Clients Across Globe


    Free Consultation.

      Do you need help in strategy, innovation or growth of your startup/business? Experts from our team will get in touch with you.

      Please do not post jobs/internships inquiries here.