ILIAS  Release_4_0_x_branch Revision 61816
 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, ilShopNewsGUI, ilShopInfoGUI, 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 69 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

Reimplemented in ilShopNewsGUI.

Definition at line 119 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'), '', '', '');
$ilTabs->addSubTabTarget('bookings', $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 158 of file class.ilShopBaseGUI.php.

References $section.

Referenced by buildSubTabs().

{
}

+ Here is the caller graph for this function:

ilShopBaseGUI::getSubSection ( )
protected

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

References $sub_section.

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

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

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

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

{
$this->tpl->getStandardTemplate();
$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pays_cart_b.gif"), $this->lng->txt("search"));
$this->tpl->setTitle($this->lng->txt("shop"));
$this->buildSubTabs();
}

+ Here is the call graph for this function:

ilShopBaseGUI::setSection (   $a_section)
protected

Definition at line 154 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 162 of file class.ilShopBaseGUI.php.

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

Definition at line 185 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:

Field Documentation

ilShopBaseGUI::$ctrl = null
protected

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

ilShopBaseGUI::$ilias = null
protected
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: