Esempio n. 1
0
 /**
  * @param string|null $url
  * @return $this
  */
 public function setPageHelpUrl($url = null)
 {
     if ($url === null) {
         $request = $this->_request;
         $frontModule = $request->getControllerModule();
         if (!$frontModule) {
             $frontModule = $this->_routeConfig->getModulesByFrontName($request->getModuleName());
             if (empty($frontModule) === false) {
                 $frontModule = $frontModule[0];
             } else {
                 $frontModule = null;
             }
         }
         $url = 'http://www.magentocommerce.com/gethelp/';
         $url .= $this->_locale->getLocale() . '/';
         $url .= $frontModule . '/';
         $url .= $request->getControllerName() . '/';
         $url .= $request->getActionName() . '/';
         $this->_pageHelpUrl = $url;
     }
     $this->_pageHelpUrl = $url;
     return $this;
 }
Esempio n. 2
0
 public function testGetModulesByFrontName()
 {
     $this->_cacheMock->expects($this->once())->method('load')->with('areaCode::RoutesConfig')->will($this->returnValue(serialize(['routerCode' => ['frontName' => 'routerName', 'modules' => ['Module1']]])));
     $this->assertEquals(['Module1'], $this->_config->getModulesByFrontName('routerName'));
 }