ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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

ilShopBaseGUI::__construct ( )

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

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

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

Referenced by ilPaymentCouponGUI\__construct(), ilPurchaseBillGUI\__construct(), ilPaymentTrusteeGUI\__construct(), ilShopBoughtObjectsGUI\__construct(), ilPaymentStatisticGUI\__construct(), ilPaymentObjectGUI\__construct(), ilShopShoppingCartGUI\__construct(), ilPurchasePaypal\__construct(), ilPurchaseBaseGUI\__construct(), and ilPurchaseBMFGUI\ilPurchaseBMFGUI().

{
global $ilCtrl, $lng, $tpl, $ilMainMenu;
$this->ctrl = $ilCtrl;
$this->tpl = $tpl;
$this->lng = $lng;
$this->settings = ilPaymentSettings::_getInstance();
$this->lng->loadLanguageModule('search');
$this->lng->loadLanguageModule('payment');
$ilMainMenu->setActive('shop');
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Function Documentation

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

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

References $result.

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

{
if(count($result->getResults()) < $result->getMaxHits())
{
return true;
}
if($result->getResultPageNumber() > 1)
{
$this->ctrl->setParameter($this,'page_number', $result->getResultPageNumber() - 1);
$this->tpl->setCurrentBlock('prev');
$this->tpl->setVariable('PREV_LINK',$this->ctrl->getLinkTarget($this, 'performSearch'));
$this->tpl->setVariable('TXT_PREV',$this->lng->txt('search_page_prev'));
$this->tpl->parseCurrentBlock();
}
for($i = 0; $i < ceil(count($result->getResults()) / $result->getMaxHits()); $i++)
{
if($i + 1 == $result->getResultPageNumber())
{
$this->tpl->setCurrentBlock('pages_link');
$this->tpl->setVariable('NUMBER', $i + 1);
$this->tpl->parseCurrentBlock();
continue;
}
$this->ctrl->setParameter($this,'page_number', $i + 1);
$link = '<a href="'.$this->ctrl->getLinkTarget($this, 'performSearch').'">'.($i + 1).'</a> ';
$this->tpl->setCurrentBlock('pages_link');
$this->tpl->setVariable('NUMBER',$link);
$this->tpl->parseCurrentBlock();
}
if($result->getResultPageNumber() < ceil(count($result->getResults()) / $result->getMaxHits()))
{
$this->tpl->setCurrentBlock('next');
$this->ctrl->setParameter($this,'page_number', $result->getResultPageNumber() + 1);
$this->tpl->setVariable('NEXT_LINK',$this->ctrl->getLinkTarget($this, 'performSearch'));
$this->tpl->setVariable('TXT_NEXT',$this->lng->txt('search_page_next'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock('prev_next');
$this->tpl->setVariable('SEARCH_PAGE',$this->lng->txt('search_page'));
$this->tpl->parseCurrentBlock();
$this->ctrl->clearParameters($this);
}

+ Here is the caller graph for this function:

ilShopBaseGUI::prepareOutput ( )
protected

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

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

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

Referenced by ilPurchaseBaseGUI\__loadTemplate(), and ilPaymentObjectGUI\executeCommand().

{
$this->tpl->getStandardTemplate();
$this->tpl->setTitleIcon(ilObject::_getIcon('', '', 'pays') , $this->lng->txt("shop"));
$this->tpl->setTitle($this->lng->txt("shop"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilShopBaseGUI::$ctrl = null
protected

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

ilShopBaseGUI::$settings = null
protected

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


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