當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ilConfirmationGUI::additem方法代碼示例

本文整理匯總了PHP中ilConfirmationGUI::additem方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilConfirmationGUI::additem方法的具體用法?PHP ilConfirmationGUI::additem怎麽用?PHP ilConfirmationGUI::additem使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ilConfirmationGUI的用法示例。


在下文中一共展示了ilConfirmationGUI::additem方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: payMethodsObject

 public function payMethodsObject($askForDeletingAddresses = array())
 {
     include_once './Services/Payment/classes/class.ilPayMethods.php';
     global $rbacsystem, $ilCtrl;
     $this->tpl->addBlockFile('ADM_CONTENT', 'adm_content', 'tpl.main_view.html', 'Services/Payment');
     if (!$rbacsystem->checkAccess('read', $this->object->getRefId())) {
         $this->ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $this->ilErr->MESSAGE);
     }
     if (count($askForDeletingAddresses)) {
         $oConfirmationGUI = new ilConfirmationGUI();
         // set confirm/cancel commands
         $oConfirmationGUI->setFormAction($ilCtrl->getFormAction($this, "deleteAddressesForPaymethods"));
         $oConfirmationGUI->setHeaderText($this->lng->txt("info_delete_sure"));
         $oConfirmationGUI->setCancel($this->lng->txt("cancel"), "payMethods");
         $oConfirmationGUI->setConfirm($this->lng->txt("confirm"), "deleteAddressesForPaymethods");
         foreach ($askForDeletingAddresses as $pm_id) {
             $pm_obj = new ilPayMethods($pm_id);
             $oConfirmationGUI->additem('paymethod[' . $pm_obj->getPmId() . ']', $pm_obj->getPmId(), $this->lng->txt('delete_addresses_bill') . ' -> ' . ilPayMethods::getStringByPaymethod($pm_obj->getPmTitle()));
         }
         $this->tpl->setVariable('CONFIRMATION', $oConfirmationGUI->getHtml());
         return true;
     }
     $obj_paymethods = new ilPayMethods();
     $paymethods = $obj_paymethods->readAll();
     $result = array();
     $counter = 0;
     foreach ($paymethods as $paymethod) {
         if ($paymethod['pm_title'] != 'epay') {
             $result[$counter]['pm_title'] = ilPayMethods::getStringByPaymethod($paymethod['pm_title']);
             $result[$counter]['pm_enabled'] = ilUtil::formCheckbox($paymethod['pm_enabled'] ? 1 : 0, 'pm_enabled[' . $paymethod['pm_id'] . ']', 1);
             $result[$counter]['save_usr_adr'] = ilUtil::formCheckbox($paymethod['save_usr_adr'] ? 1 : 0, 'save_usr_adr[' . $paymethod['pm_id'] . ']', 1);
             $this->ctrl->clearParameters($this);
             $counter++;
         }
     }
     $this->ctrl->setParameter($this, 'cmd', 'savePayMethods');
     $tbl = new ilShopTableGUI($this);
     $tbl->setTitle($this->lng->txt('pays_pay_methods'));
     $tbl->setId('tbl_paymethods');
     $tbl->setRowTemplate("tpl.shop_paymethods_row.html", "Services/Payment");
     $tbl->addColumn($this->lng->txt('title'), 'pm_title', '10%');
     $tbl->addColumn($this->lng->txt('enabled'), 'pm_enabled', '10%');
     $tbl->addColumn($this->lng->txt('save_customer_address'), 'save_usr_adr', '10%');
     $tbl->addCommandButton('savePayMethods', $this->lng->txt('save'));
     $tbl->disable('sort');
     $tbl->setData($result);
     $this->tpl->setVariable('TABLE', $tbl->getHTML());
     return true;
 }
開發者ID:arlendotcn,項目名稱:ilias,代碼行數:49,代碼來源:class.ilObjPaymentSettingsGUI.php


注:本文中的ilConfirmationGUI::additem方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。