// Add Link->getAdminLink()

This commit is contained in:
rMalie
2011-09-28 09:53:30 +00:00
parent c0cbd0bf57
commit 40b07529b4
+14
View File
@@ -271,6 +271,20 @@ class LinkCore
return $url.Dispatcher::getInstance()->createUrl('module', $params, $this->allow);
}
/**
* Create a link for a backoffice controller
*
* @param unknown_type $controller
* @param unknown_type $params
*/
public function getAdminLink($controller, array $params = array())
{
$url = _PS_BASE_URL_.__PS_BASE_URI__;
$params['token'] = Tools::getAdminTokenLite($controller);
return $url.Dispatcher::getInstance()->createUrl('module', $params, $this->allow);
}
/**
* Returns a link to a product image for display
* Note: the new image filesystem stores product images in subdirectories of img/p/