当前位置: 首页>>代码示例>>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;未经允许,请勿转载。