ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilShopBaseGUI Class Reference

Class ilShopBaseGUI. More...

+ Inheritance diagram for ilShopBaseGUI:
+ Collaboration diagram for ilShopBaseGUI:

Public Member Functions

 __construct ()
 

Protected Member Functions

 prepareOutput ()
 
 addPager ($result)
 

Protected Attributes

 $ctrl = null
 
 $lng = null
 
 $tpl = null
 
 $settings = null
 

Detailed Description

Class ilShopBaseGUI.

Author
Nadia Ahmad nahma.nosp@m.d@da.nosp@m.tabay.nosp@m..de
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

Definition at line 13 of file class.ilShopBaseGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilShopBaseGUI::__construct ( )

Reimplemented in ilShopAdvancedSearchGUI, ilShopGUI, ilShopInfoGUI, ilShopNewsGUI, ilShopPersonalSettingsGUI, and ilTermsConditionsGUI.

Definition at line 20 of file class.ilShopBaseGUI.php.

21 {
22 global $ilCtrl, $lng, $tpl, $ilMainMenu;
23
24 $this->ctrl = $ilCtrl;
25 $this->tpl = $tpl;
26 $this->lng = $lng;
27
28 $this->settings = ilPaymentSettings::_getInstance();
29
30 $this->lng->loadLanguageModule('search');
31 $this->lng->loadLanguageModule('payment');
32 $ilMainMenu->setActive('shop');
33 }
global $ilCtrl
Definition: ilias.php:18

References $ilCtrl, $lng, $tpl, and ilPaymentSettings\_getInstance().

+ Here is the call graph for this function:

Member Function Documentation

◆ addPager()

ilShopBaseGUI::addPager (   $result)
protected
Parameters
$result

Definition at line 47 of file class.ilShopBaseGUI.php.

48 {
49 if(count($result->getResults()) < $result->getMaxHits())
50 {
51 return true;
52 }
53
54 if($result->getResultPageNumber() > 1)
55 {
56 $this->ctrl->setParameter($this,'page_number', $result->getResultPageNumber() - 1);
57 $this->tpl->setCurrentBlock('prev');
58 $this->tpl->setVariable('PREV_LINK',$this->ctrl->getLinkTarget($this, 'performSearch'));
59 $this->tpl->setVariable('TXT_PREV',$this->lng->txt('search_page_prev'));
60 $this->tpl->parseCurrentBlock();
61 }
62 for($i = 0; $i < ceil(count($result->getResults()) / $result->getMaxHits()); $i++)
63 {
64 if($i + 1 == $result->getResultPageNumber())
65 {
66 $this->tpl->setCurrentBlock('pages_link');
67 $this->tpl->setVariable('NUMBER', $i + 1);
68 $this->tpl->parseCurrentBlock();
69 continue;
70 }
71
72 $this->ctrl->setParameter($this,'page_number', $i + 1);
73 $link = '<a href="'.$this->ctrl->getLinkTarget($this, 'performSearch').'">'.($i + 1).'</a> ';
74 $this->tpl->setCurrentBlock('pages_link');
75 $this->tpl->setVariable('NUMBER',$link);
76 $this->tpl->parseCurrentBlock();
77 }
78
79 if($result->getResultPageNumber() < ceil(count($result->getResults()) / $result->getMaxHits()))
80 {
81 $this->tpl->setCurrentBlock('next');
82 $this->ctrl->setParameter($this,'page_number', $result->getResultPageNumber() + 1);
83 $this->tpl->setVariable('NEXT_LINK',$this->ctrl->getLinkTarget($this, 'performSearch'));
84 $this->tpl->setVariable('TXT_NEXT',$this->lng->txt('search_page_next'));
85 $this->tpl->parseCurrentBlock();
86 }
87
88 $this->tpl->setCurrentBlock('prev_next');
89 $this->tpl->setVariable('SEARCH_PAGE',$this->lng->txt('search_page'));
90 $this->tpl->parseCurrentBlock();
91
92 $this->ctrl->clearParameters($this);
93 }
$result

References $result.

Referenced by ilShopGUI\performSearch(), and ilShopAdvancedSearchGUI\showForm().

+ Here is the caller graph for this function:

◆ prepareOutput()

ilShopBaseGUI::prepareOutput ( )
protected

Reimplemented in ilPaymentCouponGUI, ilPaymentStatisticGUI, ilPaymentTrusteeGUI, ilShopAdvancedSearchGUI, ilShopBoughtObjectsGUI, ilShopGUI, ilShopInfoGUI, ilShopNewsGUI, ilShopPersonalSettingsGUI, ilShopShoppingCartGUI, and ilTermsConditionsGUI.

Definition at line 35 of file class.ilShopBaseGUI.php.

36 {
37 $this->tpl->getStandardTemplate();
38 $this->tpl->setTitleIcon(ilObject::_getIcon('', '', 'pays') , $this->lng->txt("shop"));
39 $this->tpl->setTitle($this->lng->txt("shop"));
40
42 }
static _getIcon($a_obj_id="", $a_size="big", $a_type="", $a_offline=false)
Get icon for repository item.
static infoPanel($a_keep=true)

References ilObject\_getIcon(), and ilUtil\infoPanel().

Referenced by ilPaymentObjectGUI\executeCommand().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilShopBaseGUI::$ctrl = null
protected

Definition at line 15 of file class.ilShopBaseGUI.php.

◆ $lng

◆ $settings

ilShopBaseGUI::$settings = null
protected

Definition at line 18 of file class.ilShopBaseGUI.php.

◆ $tpl


The documentation for this class was generated from the following file: