ZendFramework get current module / controller / action

November 24th 2012

If you need to get the current module, controller, or action using ZendFramework, you can simply use this from within your controller:

PHP Code:
<?php
class IndexController extends Zend_Controller_Action
{
    public function 
indexAction()
    {
        
$module $this->getRequest()->getModuleName();
        
$controller $this->getRequest()->getControllerName();
        
$action $this->getRequest()->getActionName();
    }
}

Marjorie commented on Oct 22nd 2013

The other way I've found to disable that is to go to System >> Notifications and mark that msgasee as read. Saves you the hassle of modifying the core, which I hear is not a preferred method of doing things?This also gets you the benefit of being notified when/if something big comes up.Hope that helps you out too.Also, I'm going to subscribe to your blog I see a lot of helpful tips and I'm still pretty new to Magento. Going to be using it for our store, if I can ever get the whole thing running. Thanks!