ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilShopLinkBuilder.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
14 {
15  // define reachable shop-targets for goto_ links
16  static public $linkArray = array(
17  'ilshopgui' => array('baseClass' => 'ilShopController', 'cmdClass' => 'ilShopGUI', 'public' => 'true'),
18  'ilshopadvancedsearchgui' => array('baseClass' => 'ilShopController', 'cmdClass' => 'ilShopAdvancedSearchGUI','public' => 'true'),
19  'ilshopinfogui' => array('baseClass' => 'ilShopController', 'cmdClass' => 'ilShopInfoGUI','public' => 'true'),
20  'ilshopnewsgui' => array('baseClass' => 'ilShopController', 'cmdClass' => 'ilShopNewsGUI','public' => 'true'),
21  'ilshopboughtobjectsgui' => array('baseClass' => 'ilShopController', 'cmdClass' => 'ilShopBoughtObjectsGUI','public' => 'false'),
22  'ilshopshoppingcartgui' => array('baseClass' => 'ilShopController', 'cmdClass' => 'ilShopShoppingCartGUI','public' => 'true'),
23  'iltermsconditionsgui' => array('baseClass' => 'ilShopController', 'cmdClass' => 'ilTermsConditionsGUI','public' => 'true')
24  );
25 
31  public function __construct()
32  {
33  global $ilSetting;
34  $this->settings = $ilSetting;
35  }
36 
42  public function buildLink($key, $additional_param = null)
43  {
44  if($additional_param == null)
45  {
46  $link = ILIAS_HTTP_PATH.'/goto_'.CLIENT_ID.'_'
47  .strtolower(self::$linkArray[strtolower($key)]['cmdClass']).'_1.html';
48  }
49  else
50  {
51  $link = ILIAS_HTTP_PATH.'/goto_'.CLIENT_ID.'_'
52  .strtolower(self::$linkArray[strtolower($key)]['cmdClass']).'_1'.$additional_param.'.html';
53 
54  }
55  return $link;
56  }
57 }