本文整理汇总了PHP中Magento\Backend\Helper\Data::addPageHelpUrl方法的典型用法代码示例。如果您正苦于以下问题:PHP Data::addPageHelpUrl方法的具体用法?PHP Data::addPageHelpUrl怎么用?PHP Data::addPageHelpUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Backend\Helper\Data
的用法示例。
在下文中一共展示了Data::addPageHelpUrl方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testPageHelpUrl
/**
* @covers \Magento\Backend\Helper\Data::getPageHelpUrl
* @covers \Magento\Backend\Helper\Data::setPageHelpUrl
* @covers \Magento\Backend\Helper\Data::addPageHelpUrl
*/
public function testPageHelpUrl()
{
\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\App\\RequestInterface')->setControllerModule('dummy')->setControllerName('index')->setActionName('test');
$expected = 'http://www.magentocommerce.com/gethelp/en_US/dummy/index/test/';
$this->assertEquals($expected, $this->_helper->getPageHelpUrl(), 'Incorrect help Url');
$this->_helper->addPageHelpUrl('dummy');
$expected .= 'dummy';
$this->assertEquals($expected, $this->_helper->getPageHelpUrl(), 'Incorrect help Url suffix');
}
示例2: __construct
/**
* @param \Magento\Backend\Block\Template\Context $context
* @param \Magento\Config\Model\Config\Structure $configStructure
* @param \Magento\Backend\Helper\Data $backendHelper
* @param array $data
*/
public function __construct(\Magento\Backend\Block\Template\Context $context, \Magento\Config\Model\Config\Structure $configStructure, \Magento\Backend\Helper\Data $backendHelper, array $data = [])
{
$this->_backendHelper = $backendHelper;
parent::__construct($context, $data);
$this->_tabs = $configStructure->getTabs();
$this->setId('system_config_tabs');
$this->setTitle(__('Configuration'));
$this->_currentSectionId = $this->getRequest()->getParam('section');
$this->_backendHelper->addPageHelpUrl($this->getRequest()->getParam('section') . '/');
}