ILIAS  Release_3_10_x_branch Revision 61812
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilShopController Class Reference
+ Collaboration diagram for ilShopController:

Public Member Functions

 __construct ()
 executeCommand ()
 redirect ()

Protected Attributes

 $ctrl = null
 $ilias = null
 $lng = null
 $tpl = null

Private Member Functions

 buildTabs ()

Detailed Description

Definition at line 49 of file class.ilShopController.php.

Constructor & Destructor Documentation

ilShopController::__construct ( )

Definition at line 56 of file class.ilShopController.php.

References $ilCtrl, $ilias, $lng, and $tpl.

{
global $ilCtrl, $ilias, $lng, $tpl;
$this->ilias = $ilias;
$this->ctrl = $ilCtrl;
$this->lng = $lng;
$this->tpl = $tpl;
}

Member Function Documentation

ilShopController::buildTabs ( )
private

Definition at line 130 of file class.ilShopController.php.

References ilGeneralSettings\_getInstance(), ilPaymentTrustees\_hasAccess(), and ilPaymentVendors\_isVendor().

Referenced by executeCommand().

{
global $ilTabs, $ilUser;
$ilTabs->addTarget('content', $this->ctrl->getLinkTargetByClass('ilshopgui'), '', '', '');
$ilTabs->addTarget('advanced_search', $this->ctrl->getLinkTargetByClass('ilshopadvancedsearchgui'), '', '', '');
if(ANONYMOUS_USER_ID != $ilUser->getId())
{
if((bool)ilGeneralSettings::_getInstance()->get('topics_allow_custom_sorting'))
{
$ilTabs->addTarget('pay_personal_settings', $this->ctrl->getLinkTargetByClass('ilshoppersonalsettingsgui'), '', '', '');
}
$ilTabs->addTarget('paya_shopping_cart', $this->ctrl->getLinkTargetByClass('ilshopshoppingcartgui'), '', '', '');
$ilTabs->addTarget('paya_buyed_objects', $this->ctrl->getLinkTargetByClass('ilshopboughtobjectsgui'), '', '', '');
if(ilPaymentVendors::_isVendor($ilUser->getId()) ||
ilPaymentTrustees::_hasAccess($ilUser->getId()))
{
$ilTabs->addTarget('paya_header', $this->ctrl->getLinkTargetByClass('ilpaymentadmingui'), '', '', '');
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilShopController::executeCommand ( )

Definition at line 66 of file class.ilShopController.php.

References $cmd, ilGeneralSettings\_getInstance(), buildTabs(), and redirect().

{
global $ilUser;
if(!(bool)ilGeneralSettings::_getInstance()->get('shop_enabled'))
{
$this->ilias->raiseError($this->lng->txt('permission_denied'), $this->ilias->error_obj->MESSAGE);
}
$this->buildTabs();
$next_class = $this->ctrl->getNextClass();
$cmd = $this->ctrl->getCmd();
switch($next_class)
{
case 'ilpurchasebmfgui':
include_once 'payment/classes/class.ilPurchaseBMFGUI.php';
$pt = new ilPurchaseBMFGUI($ilUser);
$this->ctrl->forwardCommand($pt);
break;
case 'ilshopboughtobjectsgui':
include_once 'Services/Payment/classes/class.ilShopBoughtObjectsGUI.php';
$this->ctrl->forwardCommand(new ilShopBoughtObjectsGUI($ilUser));
break;
case 'ilshopshoppingcartgui':
include_once 'Services/Payment/classes/class.ilShopShoppingCartGUI.php';
$this->ctrl->forwardCommand(new ilShopShoppingCartGUI($ilUser));
break;
case 'ilshopadvancedsearchgui':
include_once 'Services/Payment/classes/class.ilShopAdvancedSearchGUI.php';
$this->ctrl->forwardCommand(new ilShopAdvancedSearchGUI());
break;
case 'ilshoppersonalsettingsgui':
include_once 'Services/Payment/classes/class.ilShopPersonalSettingsGUI.php';
$this->ctrl->forwardCommand(new ilShopPersonalSettingsGUI());
break;
case 'ilpaymentadmingui':
include_once 'payment/classes/class.ilPaymentAdminGUI.php';
$this->ctrl->forwardCommand(new ilPaymentAdminGUI($ilUser));
break;
case 'ilshopgui':
default:
if($cmd == 'redirect')
{
$this->redirect();
}
include_once 'Services/Payment/classes/class.ilShopGUI.php';
$this->ctrl->forwardCommand(new ilShopGUI());
break;
}
$this->tpl->show();
return true;
}

+ Here is the call graph for this function:

ilShopController::redirect ( )

Definition at line 154 of file class.ilShopController.php.

References $_GET, and ilUtil\stripSlashes().

Referenced by executeCommand().

{
global $ilUser;
switch(strtolower(ilUtil::stripSlashes($_GET['redirect_class'])))
{
case 'ilshopshoppingcartgui':
ilUtil::redirect($this->ctrl->getLinkTargetByClass('ilshopshoppingcartgui'));
break;
default:
break;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

ilShopController::$ctrl = null
protected

Definition at line 51 of file class.ilShopController.php.

ilShopController::$ilias = null
protected

Definition at line 52 of file class.ilShopController.php.

Referenced by __construct().

ilShopController::$lng = null
protected

Definition at line 53 of file class.ilShopController.php.

Referenced by __construct().

ilShopController::$tpl = null
protected

Definition at line 54 of file class.ilShopController.php.

Referenced by __construct().


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