ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilShopBaseGUI Class Reference

Class ilShopBoughtObjectsGUI. More...

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

Public Member Functions

 __construct ()

Protected Member Functions

 prepareOutput ()
 addPager ($result, $a_session_key)
 buildSubTabs ()
 setSection ($a_section)
 getSection ()
 setSubSection ($a_sub_section)
 getSubSection ()
 showButton ($a_cmd, $a_text, $a_target= '')
 initTableGUI ()
 setTableGUIBasicData ($tbl, $result_set, $a_default_order_column= '')

Protected Attributes

 $ctrl = null
 $ilias = null
 $lng = null
 $tpl = null
 $oGeneralSettings = null
 $section = 0
 $sub_section = 0

Detailed Description

Class ilShopBoughtObjectsGUI.

Author
Michael Jansen mjans.nosp@m.en@d.nosp@m.ataba.nosp@m.y.de
Version
$Id$

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

Constructor & Destructor Documentation

ilShopBaseGUI::__construct ( )

Reimplemented in ilShopAdvancedSearchGUI, ilShopGUI, and ilShopPersonalSettingsGUI.

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

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

Referenced by ilShopBoughtObjectsGUI\__construct(), ilShopShoppingCartGUI\__construct(), ilPaymentCouponGUI\ilPaymentCouponGUI(), ilPaymentObjectGUI\ilPaymentObjectGUI(), ilPaymentStatisticGUI\ilPaymentStatisticGUI(), and ilPaymentTrusteeGUI\ilPaymentTrusteeGUI().

{
global $ilCtrl, $ilias, $lng, $tpl, $ilMainMenu;
$this->ilias = $ilias;
$this->ctrl = $ilCtrl;
$this->tpl = $tpl;
$this->lng = $lng;
$this->lng->loadLanguageModule('search');
$this->lng->loadLanguageModule('payment');
$this->oGeneralSettings = ilGeneralSettings::_getInstance();
$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,
  $a_session_key 
)
protected

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

References $result, and $tpl.

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

{
global $tpl;
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::buildSubTabs ( )
protected

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

References ilPaymentTrustees\_hasCouponsPermission(), ilPaymentTrustees\_hasObjectPermission(), ilPaymentTrustees\_hasStatisticPermission(), ilPaymentVendors\_isVendor(), and getSection().

Referenced by prepareOutput().

{
global $ilUser, $ilTabs;
switch($this->getSection())
{
case 6:
if(ilPaymentVendors::_isVendor($ilUser->getId()) ||
{
$ilTabs->addSubTabTarget('paya_statistic', $this->ctrl->getLinkTargetByClass('ilpaymentstatisticgui'), '', '', '');
}
if(ilPaymentVendors::_isVendor($ilUser->getId()) ||
{
$ilTabs->addSubTabTarget('paya_object', $this->ctrl->getLinkTargetByClass('ilpaymentobjectgui'), '', '', '');
}
if(ilPaymentVendors::_isVendor($ilUser->getId()))
{
$ilTabs->addSubTabTarget('paya_trustees', $this->ctrl->getLinkTargetByClass('ilpaymenttrusteegui'), '', '', '');
}
if(ilPaymentVendors::_isVendor($ilUser->getId()) ||
{
$ilTabs->addSubTabTarget('paya_coupons_coupons', $this->ctrl->getLinkTargetByClass('ilpaymentcoupongui'), '', '', '');
}
break;
default:
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilShopBaseGUI::getSection ( )
protected

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

References $section.

Referenced by buildSubTabs().

{
}

+ Here is the caller graph for this function:

ilShopBaseGUI::getSubSection ( )
protected

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

References $sub_section.

{
}
ilShopBaseGUI::initTableGUI ( )
protected
ilShopBaseGUI::prepareOutput ( )
protected

Reimplemented in ilShopGUI, ilShopAdvancedSearchGUI, ilShopShoppingCartGUI, ilShopPersonalSettingsGUI, ilShopBoughtObjectsGUI, ilPaymentObjectGUI, ilPaymentTrusteeGUI, ilPaymentStatisticGUI, and ilPaymentCouponGUI.

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

References buildSubTabs(), and ilUtil\getImagePath().

{
$this->tpl->addBlockFile('CONTENT', 'content', 'tpl.shop_base.html', 'Services/Payment');
$this->tpl->addBlockFile('STATUSLINE', 'statusline', 'tpl.statusline.html');
$this->tpl->setCurrentBlock('header_image');
$this->tpl->setVariable('IMG_HEADER', ilUtil::getImagePath('icon_pays_cart_b.gif'));
$this->tpl->parseCurrentBlock();
$this->tpl->setVariable('TXT_HEADER', $this->lng->txt('shop'));
$this->buildSubTabs();
}

+ Here is the call graph for this function:

ilShopBaseGUI::setSection (   $a_section)
protected

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

Referenced by ilPaymentCouponGUI\prepareOutput(), ilPaymentStatisticGUI\prepareOutput(), ilPaymentTrusteeGUI\prepareOutput(), and ilPaymentObjectGUI\prepareOutput().

{
$this->section = $a_section;
}

+ Here is the caller graph for this function:

ilShopBaseGUI::setSubSection (   $a_sub_section)
protected

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

{
$this->sub_section = $a_sub_section;
}
ilShopBaseGUI::setTableGUIBasicData (   $tbl,
  $result_set,
  $a_default_order_column = '' 
)
protected

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

References $_GET.

Referenced by ilPaymentTrusteeGUI\__showSearchUserTable(), ilPaymentStatisticGUI\__showSearchUserTable(), and ilPaymentTrusteeGUI\__showTrusteesTable().

{
$offset = (int)$_GET['offset'];
$order = $_GET['sort_by'];
$direction = $_GET['sort_order'];
$tbl->setOrderColumn($order,$a_default_order_column);
$tbl->setOrderDirection($direction);
$tbl->setOffset($offset);
$tbl->setLimit((int)$_GET['limit']);
$tbl->setMaxCount(count($result_set));
$tbl->setFooter('tblfooter', $this->lng->txt('previous'), $this->lng->txt('next'));
$tbl->setData($result_set);
}

+ Here is the caller graph for this function:

ilShopBaseGUI::showButton (   $a_cmd,
  $a_text,
  $a_target = '' 
)
protected

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

Referenced by ilPaymentCouponGUI\__showButtons(), ilPaymentObjectGUI\__showPayMethodLink(), ilPaymentStatisticGUI\addCustomer(), ilPaymentObjectGUI\addPrice(), ilPaymentObjectGUI\editDetails(), ilPaymentObjectGUI\editPrices(), ilPaymentStatisticGUI\editStatistic(), ilPaymentTrusteeGUI\performSearch(), ilPaymentStatisticGUI\performSearch(), ilPaymentTrusteeGUI\searchUser(), ilPaymentStatisticGUI\searchUser(), ilPaymentCouponGUI\showCoupons(), ilPaymentObjectGUI\showObjects(), ilPaymentStatisticGUI\showObjectSelector(), ilPaymentObjectGUI\showObjectSelector(), ilPaymentObjectGUI\showSelectedObject(), ilPaymentStatisticGUI\showStatistics(), and ilPaymentTrusteeGUI\showTrustees().

{
$this->tpl->addBlockfile('BUTTONS', 'buttons', 'tpl.buttons.html');
$this->tpl->setCurrentBlock('btn_cell');
$this->tpl->setVariable('BTN_LINK', $this->ctrl->getLinkTarget($this, $a_cmd));
$this->tpl->setVariable('BTN_TXT', $a_text);
if($a_target)
{
$this->tpl->setVariable('BTN_TARGET',$a_target);
}
$this->tpl->parseCurrentBlock();
}

+ Here is the caller graph for this function:

Field Documentation

ilShopBaseGUI::$ctrl = null
protected

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

ilShopBaseGUI::$ilias = null
protected

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

Referenced by __construct(), and ilPaymentStatisticGUI\saveCustomer().

ilShopBaseGUI::$lng = null
protected

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

Referenced by __construct(), and ilShopGUI\forwardToPageObject().

ilShopBaseGUI::$oGeneralSettings = null
protected

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

ilShopBaseGUI::$section = 0
protected

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

Referenced by getSection().

ilShopBaseGUI::$sub_section = 0
protected

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

Referenced by getSubSection().


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