本文整理匯總了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') . '/');
}