Пример #1
0
 public static function GetSmartBlogLink($rewrite = 'smartblog', $params = null, $id_shop = null, $id_lang = null)
 {
     $url = smartblog::GetSmartBlogUrl();
     $dispatcher = Dispatcher::getInstance();
     if ($params != null) {
         return $url . $dispatcher->createUrl($rewrite, $id_lang, $params);
     } else {
         return $url . $dispatcher->createUrl($rewrite);
     }
 }
Пример #2
0
 public static function GetSmartBlogLink($rewrite = 'smartblog', $params = null, $id_shop = null, $id_lang = null)
 {
     $url = smartblog::GetSmartBlogUrl();
     $dispatcher = Dispatcher::getInstance();
     $id_lang = (int) Context::getContext()->language->id;
     $force_routes = (bool) Configuration::get('PS_REWRITING_SETTINGS');
     if ($params != null) {
         return $url . $dispatcher->createUrl($rewrite, $id_lang, $params, $force_routes);
     } else {
         $params = array();
         return $url . $dispatcher->createUrl($rewrite, $id_lang, $params, $force_routes);
     }
 }
Пример #3
0
 public function getSmartBlogTag($tagName)
 {
     $rewrite = 'smartblog_tag';
     $params = array();
     $params['tag'] = $tagName;
     $url = smartblog::GetSmartBlogUrl();
     $dispatcher = Dispatcher::getInstance();
     $id_lang = (int) Context::getContext()->language->id;
     if ($params != null) {
         return $url . $dispatcher->createUrl($rewrite, $id_lang, $params, $this->allow);
     } else {
         $params = array();
         return $url . $dispatcher->createUrl($rewrite, $id_lang, $params, $this->allow);
     }
 }