Public Member Functions | |
getPageHelpUrl () | |
setPageHelpUrl ($url=null) | |
addPageHelpUrl ($suffix) | |
getCurrentUserId () | |
Static Public Member Functions | |
static | getUrl ($route='', $params=array()) |
Protected Attributes | |
$_pageHelpUrl |
Definition at line 34 of file Data.php.
addPageHelpUrl | ( | $ | suffix | ) |
Definition at line 74 of file Data.php.
00075 { 00076 $this->_pageHelpUrl = $this->getPageHelpUrl().$suffix; 00077 return $this; 00078 }
getCurrentUserId | ( | ) |
Definition at line 89 of file Data.php.
00090 { 00091 if (Mage::getSingleton('admin/session')->getUser()) { 00092 return Mage::getSingleton('admin/session')->getUser()->getId(); 00093 } 00094 return false; 00095 }
getPageHelpUrl | ( | ) |
Definition at line 39 of file Data.php.
00040 { 00041 if (!$this->_pageHelpUrl) { 00042 $this->setPageHelpUrl(); 00043 } 00044 return $this->_pageHelpUrl; 00045 }
static getUrl | ( | $ | route = '' , |
|
$ | params = array() | |||
) | [static] |
Definition at line 80 of file Data.php.
00081 { 00082 return Mage::getModel('adminhtml/url')->getUrl($route, $params); 00083 }
setPageHelpUrl | ( | $ | url = null |
) |
Definition at line 47 of file Data.php.
00048 { 00049 if (is_null($url)) { 00050 $request = Mage::app()->getRequest(); 00051 $frontModule = $request->getControllerModule(); 00052 if (!$frontModule) { 00053 $frontName = $request->getModuleName(); 00054 $router = Mage::app()->getFrontController()->getRouterByFrontName($frontName); 00055 00056 $frontModule = $router->getModuleByFrontName($frontName); 00057 if (is_array($frontModule)) { 00058 $frontModule = $frontModule[0]; 00059 } 00060 } 00061 $url = 'http://www.magentocommerce.com/gethelp/'; 00062 $url.= Mage::app()->getLocale()->getLocaleCode().'/'; 00063 $url.= $frontModule.'/'; 00064 $url.= $request->getControllerName().'/'; 00065 $url.= $request->getActionName().'/'; 00066 00067 $this->_pageHelpUrl = $url; 00068 } 00069 $this->_pageHelpUrl = $url; 00070 00071 return $this; 00072 }