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


PHP ilUtil::prepareFormOutput方法代码示例

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


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

示例1: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $lng;
     $this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
     $this->tpl->setVariable("PAGE_ID", $a_set["obj_id"]);
     $exp_id = ilLMPageObject::getExportId($this->parent_obj->object->getId(), $a_set["obj_id"], $a_set["type"]);
     if ($this->validation) {
         if (!preg_match("/^[a-zA-Z_]*\$/", trim($_POST["exportid"][$a_set["obj_id"]]))) {
             // @todo: move to style
             $this->tpl->setVariable("STYLE", " style='background-color: #FCEAEA;' ");
             $this->tpl->setVariable("ALERT_IMG", ilUtil::img(ilUtil::getImagePath("icon_alert.svg"), $lng->txt("alert")));
         }
         $this->tpl->setVariable("EXPORT_ID", ilUtil::prepareFormOutput(ilUtil::stripSlashes($_POST["exportid"][$a_set["obj_id"]])));
     } else {
         $this->tpl->setVariable("EXPORT_ID", ilUtil::prepareFormOutput($exp_id));
     }
     if ($this->cnt_exp_ids[$exp_id] > 1) {
         $this->tpl->setVariable("ITEM_ADD_TXT", $lng->txt("cont_exp_id_used_multiple"));
         $this->tpl->setVariable("ALERT_IMG", ilUtil::img(ilUtil::getImagePath("icon_alert.svg"), $lng->txt("alert")));
         if (!$this->dup_info_given) {
             ilUtil::sendInfo($lng->txt("content_some_export_ids_multiple_times"));
             $this->dup_info_given = true;
         }
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:28,代码来源:class.ilExportIDTableGUI.php

示例2: fillRow

 /**
  * fill row 
  *
  * @access public
  * @param
  * @return
  */
 public function fillRow($data)
 {
     if (strlen($data['description'])) {
         $this->tpl->setCurrentBlock('description');
         $this->tpl->setVariable("DESCRIPTION", ilUtil::prepareFormOutput($data['description']));
         $this->tpl->parseCurrentBlock();
     }
     if ($data["worked_through"]) {
         $this->tpl->setVariable("SRC_WORKED_THROUGH", ilUtil::getImagePath("icon_ok.png"));
         $this->tpl->setVariable("ALT_WORKED_THROUGH", $this->lng->txt("worked_through"));
     } else {
         $this->tpl->setVariable("SRC_WORKED_THROUGH", ilUtil::getImagePath("icon_not_ok.png"));
         $this->tpl->setVariable("ALT_WORKED_THROUGH", $this->lng->txt("not_worked_through"));
     }
     $this->tpl->setVariable("TITLE", ilUtil::prepareFormOutput($data['title']));
     $this->tpl->setVariable("POSTPONED", $data["postponed"] ? $this->lng->txt("postponed") : '');
     if ($this->show_marker) {
         if ($data['marked']) {
             $this->tpl->setCurrentBlock('marked_img');
             $this->tpl->setVariable("ALT_MARKED", $this->lng->txt("tst_question_marked"));
             $this->tpl->setVariable("HREF_MARKED", ilUtil::getImagePath("marked.png"));
             $this->tpl->parseCurrentBlock();
         } else {
             $this->tpl->touchBlock('marker');
         }
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:34,代码来源:class.ilFilteredQuestionsTableGUI.php

示例3: fillTemplate

 /**
  * parse
  *
  * @access public
  * 
  */
 public function fillTemplate()
 {
     include_once 'Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php';
     $desc = ilMDRights::_lookupDescription($this->rbac_id, $this->obj_id);
     if (!$this->settings->isCopyrightSelectionActive() or !count($entries = ilMDCopyrightSelectionEntry::_getEntries())) {
         $this->tpl->setVariable("TXT_COPYRIGHT", $this->lng->txt('meta_copyright'));
         $this->tpl->setVariable('COPYRIGHT_VAL', ilUtil::prepareFormOutput($desc));
         return true;
     }
     $default_id = ilMDCopyrightSelectionEntry::_extractEntryId($desc);
     include_once 'Services/MetaData/classes/class.ilMDCopyrightSelectionEntry.php';
     $found = false;
     foreach ($entries as $entry) {
         $this->tpl->setCurrentBlock('copyright_selection');
         if ($entry->getEntryId() == $default_id) {
             $found = true;
             $this->tpl->setVariable('COPYRIGHT_CHECKED', 'checked="checked"');
         }
         $this->tpl->setVariable('COPYRIGHT_ID', $entry->getEntryId());
         $this->tpl->setVariable('COPYRIGHT_TITLE', $entry->getTitle());
         $this->tpl->setVariable('COPYRIGHT_DESCRIPTION', $entry->getDescription());
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setCurrentBlock('copyright_selection');
     if (!$found) {
         $this->tpl->setVariable('COPYRIGHT_CHECKED', 'checked="checked"');
     }
     $this->tpl->setVariable('COPYRIGHT_ID', 0);
     $this->tpl->setVariable('COPYRIGHT_TITLE', $this->lng->txt('meta_cp_own'));
     $this->tpl->setVariable("TXT_COPYRIGHT", $this->lng->txt('meta_copyright'));
     if (!$found) {
         $this->tpl->setVariable('COPYRIGHT_VAL', $desc);
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:40,代码来源:class.ilMDCopyrightSelectionGUI.php

示例4: getCertificateVariablesForPresentation

 /**
  * Returns an array containing all variables and values which can be exchanged in the certificate
  * The values should be calculated from real data. The $params parameter array should contain all
  * necessary information to calculate the values.
  *
  * @param array $params An array of parameters to calculate the certificate parameter values
  * @return array The certificate variables
  */
 public function getCertificateVariablesForPresentation($params = array())
 {
     global $lng;
     $lng->loadLanguageModule('certificate');
     $user_data = $params["user_data"];
     $vars = $this->getBaseVariablesForPresentation($user_data, $params["last_access"], null);
     $vars["SKILL_TITLE"] = ilUtil::prepareFormOutput($this->skill->getTitleForCertificate());
     $vars["SKILL_LEVEL_TITLE"] = ilUtil::prepareFormOutput($this->skill->getLevelTitleForCertificate($this->skill_level_id));
     $vars["SKILL_TRIGGER_TITLE"] = ilUtil::prepareFormOutput($this->skill->getTriggerTitleForCertificate($this->skill_level_id));
     // custom completion date
     $achievement_date = ilBasicSkill::lookupLevelAchievementDate($user_data["usr_id"], $this->skill_level_id);
     if ($achievement_date !== false) {
         $old = ilDatePresentation::useRelativeDates();
         ilDatePresentation::setUseRelativeDates(false);
         $vars["DATE_COMPLETED"] = ilDatePresentation::formatDate(new ilDate($achievement_date, IL_CAL_DATETIME));
         $vars["DATETIME_COMPLETED"] = ilDatePresentation::formatDate(new ilDateTime($achievement_date, IL_CAL_DATETIME));
         ilDatePresentation::setUseRelativeDates($old);
     } else {
         $vars["DATE_COMPLETED"] = "";
         $vars["DATETIME_COMPLETED"] = "";
     }
     foreach ($vars as $id => $caption) {
         $insert_tags["[" . $id . "]"] = $caption;
     }
     return $insert_tags;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:34,代码来源:class.ilSkillCertificateAdapter.php

示例5: fillRow

 /**
  * fill row 
  *
  * @access public
  * @param
  * @return
  */
 public function fillRow($data)
 {
     if (strlen($data['description'])) {
         $this->tpl->setCurrentBlock('description');
         $this->tpl->setVariable("DESCRIPTION", ilUtil::prepareFormOutput($data['description']));
         $this->tpl->parseCurrentBlock();
     }
     if ($this->show_marker) {
         if ($data['marked']) {
             $this->tpl->setCurrentBlock('marked_img');
             $this->tpl->setVariable("ALT_MARKED", $this->lng->txt("tst_question_marked"));
             $this->tpl->setVariable("HREF_MARKED", ilUtil::getImagePath("marked.png"));
             $this->tpl->parseCurrentBlock();
         } else {
             $this->tpl->touchBlock('marker');
         }
     }
     // obligatory icon
     if ($data["obligatory"]) {
         $OBLIGATORY = "<img src=\"" . ilUtil::getImagePath("obligatory.gif", "Modules/Test") . "\" alt=\"" . $this->lng->txt("question_obligatory") . "\" title=\"" . $this->lng->txt("question_obligatory") . "\" />";
     } else {
         $OBLIGATORY = '';
     }
     $this->tpl->setVariable("QUESTION_OBLIGATORY", $OBLIGATORY);
     $this->tpl->setVariable("ORDER", $data['order']);
     $this->tpl->setVariable("TITLE", ilUtil::prepareFormOutput($data['title']));
     $this->tpl->setVariable("HREF", $data['href']);
     $this->tpl->setVariable("POSTPONED", $data['postponed']);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:36,代码来源:class.ilTrackedQuestionsTableGUI.php

示例6: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $lng, $lng, $ilCtrl;
     switch ($a_set["type"]) {
         case ilPortfolioPage::TYPE_PAGE:
             $this->tpl->setCurrentBlock("title_field");
             $this->tpl->setVariable("ID", $a_set["id"]);
             $this->tpl->setVariable("VAL_TITLE", ilUtil::prepareFormOutput($a_set["title"]));
             $this->tpl->parseCurrentBlock();
             $this->tpl->setCurrentBlock("action");
             $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit_page"));
             $ilCtrl->setParameterByClass("ilportfoliopagegui", "ppage", $a_set["id"]);
             $this->tpl->setVariable("CMD_EDIT", $ilCtrl->getLinkTargetByClass("ilportfoliopagegui", "edit"));
             $this->tpl->parseCurrentBlock();
             break;
         case ilPortfolioPage::TYPE_BLOG:
             $this->tpl->setCurrentBlock("title_static");
             $this->tpl->setVariable("VAL_TITLE", $lng->txt("obj_blog") . ": " . ilObjBlog::_lookupTitle($a_set["title"]));
             $this->tpl->parseCurrentBlock();
             $obj_id = (int) $a_set["title"];
             if (isset($this->blogs[$obj_id])) {
                 $node_id = $this->blogs[$obj_id];
                 $link = ilWorkspaceAccessHandler::getGotoLink($node_id, $obj_id);
                 $ilCtrl->setParameterByClass("ilportfoliopagegui", "ppage", $a_set["id"]);
                 $link = $ilCtrl->getLinkTargetByClass(array("ilportfoliopagegui", "ilobjbloggui"), "edit");
                 $this->tpl->setCurrentBlock("action");
                 $this->tpl->setVariable("TXT_EDIT", $lng->txt("blog_edit"));
                 $this->tpl->setVariable("CMD_EDIT", $link);
                 $this->tpl->parseCurrentBlock();
             }
             break;
     }
     $this->tpl->setVariable("ID", $a_set["id"]);
     $this->tpl->setVariable("VAL_ORDER_NR", $a_set["order_nr"]);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:38,代码来源:class.ilPortfolioPageTableGUI.php

示例7: fillRow

 /**
  * Fill a single data row.
  */
 protected function fillRow($data)
 {
     global $lng, $ilCtrl;
     if ($this->params['langmode']) {
         $this->tpl->setCurrentBlock('comment');
         $this->tpl->setVariable("COM_ID", ilUtil::prepareFormOutput($data["name"] . $lng->separator . "comment"));
         $this->tpl->setVariable("COM_NAME", ilUtil::prepareFormOutput($data["name"] . $lng->separator . "comment"));
         $this->tpl->setVariable("COM_VALUE", ilUtil::prepareFormOutput($data["comment"]));
         $this->tpl->setVariable("COM_SIZE", $this->commentsize);
         $this->tpl->setVariable("COM_MAX", 250);
         $this->tpl->setVariable("TXT_COMMENT", $lng->txt('comment'));
         $this->tpl->parseCurrentBlock();
     } else {
         $this->tpl->setCurrentBlock('hidden_comment');
         $this->tpl->setVariable("COM_NAME", ilUtil::prepareFormOutput($data["name"] . $lng->separator . "comment"));
         $this->tpl->setVariable("COM_VALUE", ilUtil::prepareFormOutput($data["comment"]));
         $this->tpl->parseCurrentBlock();
     }
     $this->tpl->setVariable("T_ROWS", ceil(strlen($data["translation"]) / $this->inputsize));
     $this->tpl->setVariable("T_SIZE", $this->inputsize);
     $this->tpl->setVariable("T_NAME", ilUtil::prepareFormOutput($data["name"]));
     $this->tpl->setVariable("T_USER_VALUE", ilUtil::prepareFormOutput($data["translation"]));
     $this->tpl->setVariable("MODULE", ilUtil::prepareFormOutput($data["module"]));
     $this->tpl->setVariable("TOPIC", ilUtil::prepareFormOutput($data["topic"]));
     $this->tpl->setVariable("DEFAULT_VALUE", ilUtil::prepareFormOutput($data["default"]));
     $this->tpl->setVariable("COMMENT", ilUtil::prepareFormOutput($data["default_comment"]));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:30,代码来源:class.ilLanguageExtTableGUI.php

示例8: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $lng;
     $this->tpl->setVariable("ID", $a_set["id"]);
     $this->tpl->setVariable("TEXT", ilUtil::prepareFormOutput($a_set["text"]));
     $this->tpl->setVariable("TT_ID", ilUtil::prepareFormOutput($a_set["tt_id"]));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:10,代码来源:class.ilHelpTooltipTableGUI.php

示例9: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $lng;
     $this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
     $this->tpl->setVariable("PAGE_ID", $a_set["obj_id"]);
     $screen_ids = ilHelpMapping::getScreenIdsOfChapter($a_set["obj_id"]);
     $this->tpl->setVariable("SCREEN_IDS", ilUtil::prepareFormOutput(implode($screen_ids, "\n")));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:11,代码来源:class.ilHelpMappingTableGUI.php

示例10: fillRow

 /**
  * Standard Version of Fill Row. Most likely to
  * be overwritten by derived class.
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl;
     $this->pos += 10;
     $this->tpl->setVariable("POS", ilUtil::prepareFormOutput($this->pos));
     $this->tpl->setVariable("TID", $a_set["hier_id"] . ":" . $a_set["pc_id"]);
     $this->tpl->setVariable("VAL_CAPTION", ilUtil::prepareFormOutput($a_set["caption"]));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:12,代码来源:class.ilPCTabsTableGUI.php

示例11: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $lng;
     $this->tpl->setVariable("VAL_COMPONENT", ilAccessKey::getComponentNames($a_set["func_id"]));
     $this->tpl->setVariable("VAL_FUNCTION", ilAccessKey::getFunctionName($a_set["func_id"]));
     $this->tpl->setVariable("FUNC_ID", $a_set["func_id"]);
     $this->tpl->setVariable("VAL_ACC_KEY", ilUtil::prepareFormOutput($a_set["access_key"]));
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:11,代码来源:class.ilAccessKeyTableGUI.php

示例12: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $lng, $ilCtrl;
     // owner
     if (!$this->shared) {
         $this->tpl->setCurrentBlock("title_form");
         $this->tpl->setVariable("VAL_ID", $a_set["id"]);
         $this->tpl->setVariable("VAL_TITLE", ilUtil::prepareFormOutput($a_set["title"]));
         $this->tpl->parseCurrentBlock();
         if (in_array($a_set["id"], $this->shared_objects)) {
             $this->tpl->setCurrentBlock("shared");
             $this->tpl->setVariable("TXT_SHARED", $lng->txt("wsp_status_shared"));
             $this->tpl->parseCurrentBlock();
         }
         $this->tpl->setCurrentBlock("chck");
         $this->tpl->setVariable("VAL_ID", $a_set["id"]);
         $this->tpl->parseCurrentBlock();
         $this->tpl->setCurrentBlock("edit");
         $this->tpl->setVariable("VAL_ID", $a_set["id"]);
         $this->tpl->setVariable("STATUS_ONLINE", $a_set["is_online"] ? " checked=\"checked\"" : "");
         $this->tpl->setVariable("VAL_DEFAULT", $a_set["is_default"] ? $lng->txt("yes") : "");
         $this->tpl->parseCurrentBlock();
         $ilCtrl->setParameter($this->parent_obj, "prt_id", $a_set["id"]);
         $this->tpl->setCurrentBlock("action");
         $this->tpl->setVariable("URL_ACTION", $ilCtrl->getLinkTarget($this->parent_obj, "preview"));
         $this->tpl->setVariable("TXT_ACTION", $lng->txt("user_profile_preview"));
         $this->tpl->parseCurrentBlock();
         $this->tpl->setVariable("URL_ACTION", $ilCtrl->getLinkTarget($this->parent_obj, "pages"));
         $this->tpl->setVariable("TXT_ACTION", $lng->txt("prtf_edit_portfolio"));
         $this->tpl->parseCurrentBlock();
         if ($a_set["is_online"]) {
             if (!$a_set["is_default"]) {
                 $this->tpl->setVariable("URL_ACTION", $ilCtrl->getLinkTarget($this->parent_obj, "setDefaultConfirmation"));
                 $this->tpl->setVariable("TXT_ACTION", $lng->txt("prtf_set_as_default"));
                 $this->tpl->parseCurrentBlock();
             } else {
                 $this->tpl->setVariable("URL_ACTION", $ilCtrl->getLinkTarget($this->parent_obj, "unsetDefault"));
                 $this->tpl->setVariable("TXT_ACTION", $lng->txt("prtf_unset_as_default"));
                 $this->tpl->parseCurrentBlock();
             }
         }
         $ilCtrl->setParameter($this->parent_obj, "prt_id", "");
     } else {
         $this->tpl->setCurrentBlock("title_static");
         $this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
         $this->tpl->parseCurrentBlock();
         if ($a_set["password"]) {
             $this->tpl->setCurrentBlock("shared");
             $this->tpl->setVariable("TXT_SHARED", $lng->txt("wsp_password_protected_resource"));
             $this->tpl->parseCurrentBlock();
         }
         $link = ilLink::_getStaticLink($a_set["id"], "prtf", true);
         $this->tpl->setCurrentBlock("action");
         $this->tpl->setVariable("URL_ACTION", $link);
         $this->tpl->setVariable("TXT_ACTION", $lng->txt("view"));
         $this->tpl->parseCurrentBlock();
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:61,代码来源:class.ilPortfolioTableGUI.php

示例13: fillRow

 /**
  * Fill table row
  */
 protected function fillRow($a_set)
 {
     global $lng, $lng, $ilCtrl;
     $this->tpl->setVariable("VAL_TITLE", ilUtil::prepareFormOutput($a_set["title"]));
     $this->tpl->setVariable("TXT_EDIT", $lng->txt("edit"));
     $ilCtrl->setParameterByClass("ilextpublicprofilepagegui", "user_page", $a_set["id"]);
     $this->tpl->setVariable("CMD_EDIT", $ilCtrl->getLinkTargetByClass("ilextpublicprofilepagegui", "edit"));
     $this->tpl->setVariable("ID", $a_set["id"]);
     $this->tpl->setVariable("VAL_ORDER_NR", $a_set["order_nr"]);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:13,代码来源:class.ilExtendedProfileTableGUI.php

示例14: fillRow

 /**
  * fill row 
  *
  * @access public
  * @param
  * @return
  */
 public function fillRow($a_set)
 {
     global $ilUser, $ilAccess;
     $this->tpl->setVariable('VAL_ID', $a_set['solution_id']);
     if (strlen($a_set['webpath'])) {
         $this->tpl->setVariable('VAL_FILE', '<a href="' . $a_set['webpath'] . $a_set['value1'] . '" target=\\"_blank\\">' . ilUtil::prepareFormOutput($a_set['value2']) . '</a>');
     } else {
         $this->tpl->setVariable('VAL_FILE', ilUtil::prepareFormOutput($a_set['value2']));
     }
     ilDatePresentation::setUseRelativeDates(false);
     $this->tpl->setVariable('VAL_DATE', ilDatePresentation::formatDate(new ilDateTime($a_set["tstamp"], IL_CAL_UNIX)));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:19,代码来源:class.assFileUploadFileTableGUI.php

示例15: fillRow

 /**
  * fill row 
  *
  * @access public
  * @param
  * @return
  */
 public function fillRow($data)
 {
     global $ilUser, $ilAccess;
     $username = $this->tstObject->userLookupFullName($data["user_fi"], TRUE);
     $this->tpl->setVariable("DATETIME", ilDatePresentation::formatDate(new ilDateTime($data["tstamp"], IL_CAL_UNIX)));
     $this->tpl->setVariable("USER", $username);
     $this->tpl->setVariable("LOG", trim(ilUtil::prepareFormOutput($data["logtext"])));
     $location = '';
     if (strlen($data["ref_id"]) && strlen($data["href"])) {
         $location = '<a href="' . $data['href'] . '">' . $this->lng->txt("perma_link") . '</a>';
     }
     $this->tpl->setVariable("LOCATION", $location);
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:20,代码来源:class.ilTestHistoryTableGUI.php


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