本文整理汇总了PHP中Mage_Adminhtml_Controller_Action::_setActiveMenu方法的典型用法代码示例。如果您正苦于以下问题:PHP Mage_Adminhtml_Controller_Action::_setActiveMenu方法的具体用法?PHP Mage_Adminhtml_Controller_Action::_setActiveMenu怎么用?PHP Mage_Adminhtml_Controller_Action::_setActiveMenu使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Mage_Adminhtml_Controller_Action
的用法示例。
在下文中一共展示了Mage_Adminhtml_Controller_Action::_setActiveMenu方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _setActiveMenu
/**
* Define active menu item in menu block
*
* @param $menuPath
* @return Mage_Adminhtml_Controller_Action
*/
protected function _setActiveMenu($menuPath)
{
parent::_setActiveMenu($menuPath);
if (method_exists($this, '_title')) {
try {
$labels = array();
$parts = explode("/", $menuPath);
/** @var $menu Mage_Adminhtml_Block_Page_Menu */
$menu = $this->getLayout()->getBlock('menu');
$children = $menu->getMenuArray();
foreach ($parts as $part) {
if ($label = $this->_getPartNameFromChildren($part, $children)) {
$labels[] = $label;
} else {
break;
}
}
if (count($labels)) {
$this->_title();
foreach ($labels as $label) {
$this->_title($label);
}
}
} catch (Exception $e) {
$this->_commonHelper()->getException()->logException($e);
}
}
return $this;
}
示例2: _setActiveMenu
protected function _setActiveMenu($menuPath)
{
parent::_setActiveMenu($menuPath);
/**
* Save current report access key for limitaton of Custom Options dialog
* @see AW_Advancedreports_Block_Adminhtml_Setup
*/
Mage::register(AW_Advancedreports_Block_Adminhtml_Setup::DATA_KEY_SECURE_CHECK, $menuPath, true);
return $this;
}
示例3: _setActiveMenuValue
protected function _setActiveMenuValue()
{
return parent::_setActiveMenu($this->getControllerActiveMenuPath());
}