本文介绍了如何获得对当前Mage_Core_Controller_Varien_Action或后代的引用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从块代码中引用当前"运行动作.

I need a reference to the "current" running action from the code of a block.

即我有一个$ this是Mage_Core_Block_Template的后代,我需要一种方法来为当前请求在Mage_Core_Controller_Front_Action实例上调用方法.

i.e. I have a $this which is a descendant of Mage_Core_Block_Template and I need a way to call methods on the an instance of Mage_Core_Controller_Front_Action for the current request.

我希望这已经足够清楚了.

I hope this was clear enough.

推荐答案

发现我可以使用$ this-> getAction()

Found out that I can use $this->getAction()

这篇关于如何获得对当前Mage_Core_Controller_Varien_Action或后代的引用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 13:42