当前位置: 首页>>代码示例>>PHP>>正文


PHP ilRadioGroupInputGUI::render方法代码示例

本文整理汇总了PHP中ilRadioGroupInputGUI::render方法的典型用法代码示例。如果您正苦于以下问题:PHP ilRadioGroupInputGUI::render方法的具体用法?PHP ilRadioGroupInputGUI::render怎么用?PHP ilRadioGroupInputGUI::render使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilRadioGroupInputGUI的用法示例。


在下文中一共展示了ilRadioGroupInputGUI::render方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: showMail


//.........这里部分代码省略.........
         if (!$sender || !$sender->getId()) {
             $from = new ilCustomInputGUI($this->lng->txt('from'));
             $from->setHtml($mailData['import_name'] . ' (' . $this->lng->txt('user_deleted') . ')');
             $form->addItem($from);
         } else {
             $from = new ilCustomInputGUI($this->lng->txt('from'));
             $from->setHtml(ilUtil::img(ilUtil::getImagePath('HeaderIconAvatar.svg'), ilMail::_getIliasMailerName()) . '<br />' . ilMail::_getIliasMailerName());
             $form->addItem($from);
         }
     }
     $to = new ilCustomInputGUI($this->lng->txt('mail_to'));
     $to->setHtml(ilUtil::htmlencodePlainString($this->umail->formatNamesForOutput($mailData['rcp_to']), false));
     $form->addItem($to);
     if ($mailData['rcp_cc']) {
         $cc = new ilCustomInputGUI($this->lng->txt('cc'));
         $cc->setHtml(ilUtil::htmlencodePlainString($this->umail->formatNamesForOutput($mailData['rcp_cc']), false));
         $form->addItem($cc);
     }
     if ($mailData['rcp_bcc']) {
         $bcc = new ilCustomInputGUI($this->lng->txt('bc'));
         $bcc->setHtml(ilUtil::htmlencodePlainString($this->umail->formatNamesForOutput($mailData['rcp_bcc']), false));
         $form->addItem($bcc);
     }
     $subject = new ilCustomInputGUI($this->lng->txt('subject'));
     $subject->setHtml(ilUtil::htmlencodePlainString($mailData['m_subject'], true));
     $form->addItem($subject);
     $date = new ilCustomInputGUI($this->lng->txt('date'));
     $date->setHtml(ilDatePresentation::formatDate(new ilDateTime($mailData['send_time'], IL_CAL_DATETIME)));
     $form->addItem($date);
     $message = new ilCustomInputGUI($this->lng->txt('message'));
     $message->setHtml(ilUtil::htmlencodePlainString($mailData['m_message'], true));
     $form->addItem($message);
     if ($mailData['attachments']) {
         $att = new ilCustomInputGUI($this->lng->txt('attachments'));
         $radiog = new ilRadioGroupInputGUI('', 'filename');
         foreach ($mailData['attachments'] as $file) {
             $radiog->addOption(new ilRadioOption($file, md5($file)));
         }
         $att->setHtml($radiog->render());
         $form->addCommandButton('deliverFile', $this->lng->txt('download'));
         $form->addItem($att);
     }
     $isTrashFolder = false;
     if ($this->mbox->getTrashFolder() == $_GET['mobj_id']) {
         $isTrashFolder = true;
     }
     $current_folder_data = $this->mbox->getFolderData((int) $_GET['mobj_id']);
     $selectOptions = array();
     $actions = $this->mbox->getActions((int) $_GET["mobj_id"]);
     foreach ($actions as $key => $action) {
         if ($key == 'moveMails') {
             $folders = $this->mbox->getSubFolders();
             foreach ($folders as $folder) {
                 if (($folder["type"] != 'trash' || !$isTrashFolder) && $folder['obj_id'] != $current_folder_data['obj_id']) {
                     $optionText = '';
                     if ($folder['type'] != 'user_folder') {
                         $optionText = $action . ' ' . $this->lng->txt('mail_' . $folder['title']) . ($folder['type'] == 'trash' ? ' (' . $this->lng->txt('delete') . ')' : '');
                     } else {
                         $optionText = $action . ' ' . $folder['title'];
                     }
                     $selectOptions[$folder['obj_id']] = $optionText;
                 }
             }
         }
     }
     if ($current_folder_data['type'] == 'user_folder') {
         $txt_folder = $current_folder_data['title'];
     } else {
         $txt_folder = $this->lng->txt('mail_' . $current_folder_data['title']);
     }
     $ilToolbar->addSeparator();
     $ilToolbar->addText(sprintf($this->lng->txt('current_folder'), $txt_folder));
     if (is_array($selectOptions) && count($selectOptions)) {
         include_once 'Services/Form/classes/class.ilSelectInputGUI.php';
         $actions = new ilSelectInputGUI('', 'selected_cmd');
         $actions->setOptions($selectOptions);
         $this->ctrl->setParameter($this, 'mail_id', (int) $_GET['mail_id']);
         $ilToolbar->setFormAction($this->ctrl->getFormAction($this, 'showMail'));
         $ilToolbar->addInputItem($actions);
         $ilToolbar->addFormButton($this->lng->txt('submit'), 'changeFolder');
     }
     // Navigation
     $prevMail = $this->umail->getPreviousMail((int) $_GET['mail_id']);
     $nextMail = $this->umail->getNextMail((int) $_GET['mail_id']);
     if (is_array($prevMail) || is_array($nextMail)) {
         $ilToolbar->addSeparator();
         if ($prevMail['mail_id']) {
             $this->ctrl->setParameter($this, 'mail_id', $prevMail['mail_id']);
             $ilToolbar->addButton($this->lng->txt('previous'), $this->ctrl->getLinkTarget($this, 'showMail'));
             $this->ctrl->clearParameters($this);
         }
         if ($nextMail['mail_id']) {
             $this->ctrl->setParameter($this, 'mail_id', $nextMail['mail_id']);
             $ilToolbar->addButton($this->lng->txt('next'), $this->ctrl->getLinkTarget($this, 'showMail'));
             $this->ctrl->clearParameters($this);
         }
     }
     $this->tpl->setContent($form->getHTML());
     $this->tpl->show();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:101,代码来源:class.ilMailFolderGUI.php


注:本文中的ilRadioGroupInputGUI::render方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。