Inheritance diagram for ilPaymentPurchaseGUI:
Collaboration diagram for ilPaymentPurchaseGUI:Public Member Functions | |
| ilPaymentPurchaseGUI ($a_ref_id) | |
| & | executeCommand () |
| execute command | |
| showDetails () | |
| addToShoppingCart () | |
| __initShoppingCartObject () | |
| __initPaymentObject () | |
| __initPricesObject () | |
| __buildHeader () | |
| __buildStatusline () | |
| __buildLocator () | |
| __buildStylesheet () | |
| ilPaymentAdminGUI (&$user_obj) | |
| & | executeCommand () |
| execute command | |
Data Fields | |
| $ctrl | |
| $ilias | |
| $lng | |
| $tpl | |
| $object = null | |
| $user_obj | |
Definition at line 37 of file class.ilPaymentPurchaseGUI.php.
| ilPaymentPurchaseGUI::__buildHeader | ( | ) |
Definition at line 264 of file class.ilPaymentPurchaseGUI.php.
References __buildStatusline(), and __buildStylesheet().
Referenced by executeCommand().
{
$this->tpl->addBlockFile("CONTENT", "content", "tpl.payb_content.html");
$this->tpl->setVariable("HEADER",$this->object->getTitle());
$this->tpl->setVariable("DESCRIPTION",$this->object->getDescription());
$this->__buildStylesheet();
$this->__buildStatusline();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilPaymentPurchaseGUI::__buildLocator | ( | ) |
Definition at line 281 of file class.ilPaymentPurchaseGUI.php.
References sendInfo().
Referenced by __buildStatusline().
{
$this->tpl->addBlockFile("LOCATOR", "locator", "tpl.locator.html");
$this->tpl->setVariable("TXT_LOCATOR",$this->lng->txt("locator"));
$this->tpl->setCurrentBlock("locator_item");
$this->tpl->setVariable("ITEM", $this->lng->txt("repository"));
$this->tpl->setVariable("LINK_ITEM", "../repository.php?getlast=true");
$this->tpl->parseCurrentBlock();
// CHECK for new mail and info
sendInfo();
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilPaymentPurchaseGUI::__buildStatusline | ( | ) |
Definition at line 275 of file class.ilPaymentPurchaseGUI.php.
References __buildLocator().
Referenced by __buildHeader().
{
$this->tpl->addBlockFile("STATUSLINE", "statusline", "tpl.statusline.html");
$this->__buildLocator();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilPaymentPurchaseGUI::__buildStylesheet | ( | ) |
Definition at line 297 of file class.ilPaymentPurchaseGUI.php.
References ilUtil::getJSPath(), and ilUtil::getStyleSheetLocation().
Referenced by __buildHeader().
{
$this->tpl->setVariable("LOCATION_STYLESHEET",ilUtil::getStyleSheetLocation());
$this->tpl->setVariable("LOCATION_JAVASCRIPT",ilUtil::getJSPath('functions.js'));
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilPaymentPurchaseGUI::__initPaymentObject | ( | ) |
Definition at line 247 of file class.ilPaymentPurchaseGUI.php.
References ilPaymentObject::_lookupPobjectId().
Referenced by addToShoppingCart(), and showDetails().
{
include_once './payment/classes/class.ilPaymentObject.php';
$this->pobject =& new ilPaymentObject($this->ilias->account,ilPaymentObject::_lookupPobjectId($this->ref_id));
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilPaymentPurchaseGUI::__initPricesObject | ( | ) |
Definition at line 255 of file class.ilPaymentPurchaseGUI.php.
Referenced by showDetails().
{
include_once './payment/classes/class.ilPaymentPrices.php';
$this->price_obj =& new ilPaymentPrices($this->pobject->getPobjectId());
return true;
}
Here is the caller graph for this function:| ilPaymentPurchaseGUI::__initShoppingCartObject | ( | ) |
Definition at line 238 of file class.ilPaymentPurchaseGUI.php.
Referenced by addToShoppingCart(), and showDetails().
{
include_once './payment/classes/class.ilPaymentShoppingCart.php';
$this->sc_obj =& new ilPaymentShoppingCart($this->ilias->account);
return true;
}
Here is the caller graph for this function:| ilPaymentPurchaseGUI::addToShoppingCart | ( | ) |
Definition at line 202 of file class.ilPaymentPurchaseGUI.php.
References $_POST, __initPaymentObject(), __initShoppingCartObject(), sendInfo(), and showDetails().
{
if(!isset($_POST['price_id']))
{
sendInfo($this->lng->txt('pay_select_price'));
$this->showDetails();
return true;
}
else
{
$this->__initPaymentObject();
$this->__initShoppingCartObject();
$this->sc_obj->setPriceId((int) $_POST['price_id']);
$this->sc_obj->setPobjectId($this->pobject->getPobjectId());
$this->sc_obj->add();
# $tmp_obj =& ilObjectFactory::getInstanceByRefId($this->pobject->getRefId());
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.pay_purchase_details.html','payment');
$this->tpl->setCurrentBlock("shopping_cart");
$this->tpl->setVariable("LINK_GOTO_SHOPPING_CART", ILIAS_HTTP_PATH . "/payment/payment.php");
$this->tpl->setVariable("LINK_BUY", ILIAS_HTTP_PATH . "/payment/start_bmf.php");
$this->tpl->setVariable("TXT_GOTO_SHOPPING_CART", $this->lng->txt('pay_goto_shopping_cart'));
$this->tpl->setVariable("TXT_BUY", $this->lng->txt('pay_click_to_buy'));
$this->tpl->parseCurrentBlock("shopping_cart");
sendInfo($this->lng->txt('pay_added_to_shopping_cart'));
return true;
}
}
Here is the call graph for this function:| & ilPaymentPurchaseGUI::executeCommand | ( | ) |
execute command
Reimplemented from ilObjectGUI.
Definition at line 69 of file class.ilPaymentPurchaseGUI.php.
References $cmd, and __buildHeader().
{
$cmd = $this->ctrl->getCmd();
if (!$cmd = $this->ctrl->getCmd())
{
$cmd = "showDetails";
}
// build header if called from start_purchase.php
if($this->ctrl->getTargetScript() == 'start_purchase.php')
{
$this->__buildHeader();
}
$this->$cmd();
}
Here is the call graph for this function:| & ilPaymentPurchaseGUI::executeCommand | ( | ) |
execute command
Reimplemented from ilObjectGUI.
Definition at line 51 of file class.ilPurchaseGUI.php.
References $cmd, and ilObjectGUI::$tree.
| ilPaymentPurchaseGUI::ilPaymentAdminGUI | ( | &$ | user_obj | ) |
| ilPaymentPurchaseGUI::ilPaymentPurchaseGUI | ( | $ | a_ref_id | ) |
Definition at line 46 of file class.ilPaymentPurchaseGUI.php.
References $ilCtrl, $ilErr, $ilias, $lng, $tpl, ilObjectGUI::$tree, and ilObjectFactory::getInstanceByRefId().
{
global $ilCtrl,$lng,$ilErr,$ilias,$tpl,$tree;
$this->ctrl =& $ilCtrl;
$this->ctrl->saveParameter($this,array("ref_id"));
$this->ilErr =& $ilErr;
$this->ilias =& $ilias;
$this->lng =& $lng;
$this->lng->loadLanguageModule('payment');
$this->tpl =& $tpl;
$this->ref_id = $a_ref_id;
$this->object =& ilObjectFactory::getInstanceByRefId($this->ref_id);
}
Here is the call graph for this function:| ilPaymentPurchaseGUI::showDetails | ( | ) |
Definition at line 86 of file class.ilPaymentPurchaseGUI.php.
References $counter, __initPaymentObject(), __initPricesObject(), __initShoppingCartObject(), ilPaymentPrices::_getPriceString(), ilUtil::formRadioButton(), ilUtil::getImagePath(), and sendInfo().
Referenced by addToShoppingCart().
{
$this->__initPaymentObject();
$this->__initPricesObject();
$this->__initShoppingCartObject();
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.pay_purchase_details.html','payment');
if($this->pobject->getStatus() == $this->pobject->STATUS_EXPIRES)
{
sendInfo($this->lng->txt('pay_expires_info'));
return false;
}
$prices = $this->price_obj->getPrices();
$buyedObject = "";
if($this->sc_obj->isInShoppingCart($this->pobject->getPobjectId()))
{
$buyedObject = $this->sc_obj->getEntry($this->pobject->getPobjectId());
if (is_array($prices) &&
count($prices) > 1)
{
sendInfo($this->lng->txt('pay_item_already_in_sc_choose_another'));
}
else
{
sendInfo($this->lng->txt('pay_item_already_in_sc'));
}
$this->tpl->setCurrentBlock("shopping_cart");
$this->tpl->setVariable("LINK_GOTO_SHOPPING_CART", ILIAS_HTTP_PATH . "/payment/payment.php");
$this->tpl->setVariable("LINK_BUY", ILIAS_HTTP_PATH . "/payment/start_bmf.php");
$this->tpl->setVariable("TXT_GOTO_SHOPPING_CART", $this->lng->txt('pay_goto_shopping_cart'));
$this->tpl->setVariable("TXT_BUY", $this->lng->txt('pay_click_to_buy'));
$this->tpl->parseCurrentBlock("shopping_cart");
}
$this->ctrl->setParameter($this, "ref_id", $this->pobject->getRefId());
if (!is_array($buyedObject) ||
(is_array($buyedObject) && is_array($prices) && count($prices) > 1))
{
$this->tpl->setVariable("DETAILS_FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TYPE_IMG",ilUtil::getImagePath('icon_'.$this->object->getType().'_b.gif'));
$this->tpl->setVariable("ALT_IMG",$this->lng->txt('obj_'.$this->object->getType()));
$this->tpl->setVariable("TITLE",$this->object->getTitle());
// payment infos
$this->tpl->setVariable("TXT_INFO",$this->lng->txt('info'));
switch($this->pobject->getPayMethod())
{
case $this->pobject->PAY_METHOD_BILL:
$this->tpl->setVariable("INFO_PAY",$this->lng->txt('pay_bill'));
$this->tpl->setVariable("INPUT_CMD",'getBill');
$this->tpl->setVariable("INPUT_VALUE",$this->lng->txt('pay_get_bill'));
break;
case $this->pobject->PAY_METHOD_BMF:
$this->tpl->setVariable("INFO_PAY",$this->lng->txt('pay_bmf_info'));
$this->tpl->setVariable("INPUT_CMD",'addToShoppingCart');
$this->tpl->setVariable("INPUT_VALUE",$this->lng->txt('pay_add_to_shopping_cart'));
break;
}
$this->tpl->setVariable("ROWSPAN",count($prices));
$this->tpl->setVariable("TXT_PRICES",$this->lng->txt('prices'));
}
if (is_array($prices))
{
if (count($prices) > 1)
{
$counter = 0;
foreach($prices as $price)
{
if ($counter == 0)
{
$placeholderCheckbox = "CHECKBOX";
$placeholderDuration = "DURATION";
$placeholderPrice = "PRICE";
}
else
{
$placeholderCheckbox = "ROW_CHECKBOX";
$placeholderDuration = "ROW_DURATION";
$placeholderPrice = "ROW_PRICE";
}
$this->tpl->setCurrentBlock("price_row");
if ($buyedObject["price_id"] == $price['price_id'])
{
$this->tpl->setVariable($placeholderCheckbox,ilUtil::formRadioButton(1,'price_id',$price['price_id']));
}
else
{
$this->tpl->setVariable($placeholderCheckbox,ilUtil::formRadioButton(0,'price_id',$price['price_id']));
}
$this->tpl->setVariable($placeholderDuration,$price['duration'].' '.$this->lng->txt('paya_months'));
$this->tpl->setVariable($placeholderPrice,ilPaymentPrices::_getPriceString($price['price_id']));
$this->tpl->parseCurrentBlock();
$counter++;
}
}
else if (!is_array($buyedObject))
{
foreach($prices as $price)
{
$this->tpl->setVariable("CHECKBOX",ilUtil::formRadioButton(0,'price_id',$price['price_id']));
$this->tpl->setVariable("DURATION",$price['duration'].' '.$this->lng->txt('paya_months'));
$this->tpl->setVariable("PRICE",ilPaymentPrices::_getPriceString($price['price_id']));
}
}
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilPaymentPurchaseGUI::$ctrl |
Definition at line 39 of file class.ilPaymentPurchaseGUI.php.
| ilPaymentPurchaseGUI::$ilias |
Reimplemented from ilObjectGUI.
Definition at line 40 of file class.ilPaymentPurchaseGUI.php.
Referenced by ilPaymentPurchaseGUI().
| ilPaymentPurchaseGUI::$lng |
Reimplemented from ilObjectGUI.
Definition at line 41 of file class.ilPaymentPurchaseGUI.php.
Referenced by ilPaymentPurchaseGUI().
| ilPaymentPurchaseGUI::$object = null |
Reimplemented from ilObjectGUI.
Definition at line 44 of file class.ilPaymentPurchaseGUI.php.
| ilPaymentPurchaseGUI::$tpl |
Reimplemented from ilObjectGUI.
Definition at line 42 of file class.ilPaymentPurchaseGUI.php.
Referenced by ilPaymentPurchaseGUI().
| ilPaymentPurchaseGUI::$user_obj |
Definition at line 37 of file class.ilPurchaseGUI.php.
Referenced by ilPaymentAdminGUI().
1.7.1