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


PHP ilTemplate::setVAriable方法代码示例

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


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

示例1: render

 /**
  * Render html
  */
 function render($a_mode = "")
 {
     global $lng;
     $quota_exceeded = $quota_legend = false;
     if (self::$check_wsp_quota) {
         include_once "Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
         if (!ilDiskQuotaHandler::isUploadPossible()) {
             $lng->loadLanguageModule("file");
             $quota_exceeded = $lng->txt("personal_workspace_quota_exceeded_warning");
         } else {
             $quota_legend = ilDiskQuotaHandler::getStatusLegend();
         }
     }
     $f_tpl = new ilTemplate("tpl.prop_file.html", true, true, "Services/Form");
     // show filename selection if enabled
     if ($this->isFileNameSelectionEnabled()) {
         $f_tpl->setCurrentBlock('filename');
         $f_tpl->setVariable('POST_FILENAME', $this->getFileNamePostVar());
         $f_tpl->setVariable('VAL_FILENAME', $this->getFilename());
         $f_tpl->setVariable('FILENAME_ID', $this->getFieldId());
         $f_tpl->setVAriable('TXT_FILENAME_HINT', $lng->txt('if_no_title_then_filename'));
         $f_tpl->parseCurrentBlock();
     } else {
         if (trim($this->getValue() != "")) {
             if (!$this->getDisabled() && $this->getALlowDeletion()) {
                 $f_tpl->setCurrentBlock("delete_bl");
                 $f_tpl->setVariable("POST_VAR_D", $this->getPostVar());
                 $f_tpl->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
                 $f_tpl->parseCurrentBlock();
             }
             $f_tpl->setCurrentBlock('prop_file_propval');
             $f_tpl->setVariable('FILE_VAL', $this->getValue());
             $f_tpl->parseCurrentBlock();
         }
     }
     if ($a_mode != "toolbar") {
         if (!$quota_exceeded) {
             $this->outputSuffixes($f_tpl);
             $f_tpl->setCurrentBlock("max_size");
             $f_tpl->setVariable("TXT_MAX_SIZE", $lng->txt("file_notice") . " " . $this->getMaxFileSizeString());
             $f_tpl->parseCurrentBlock();
             if ($quota_legend) {
                 $f_tpl->setVariable("TXT_MAX_SIZE", $quota_legend);
                 $f_tpl->parseCurrentBlock();
             }
         } else {
             $f_tpl->setCurrentBlock("max_size");
             $f_tpl->setVariable("TXT_MAX_SIZE", $quota_exceeded);
             $f_tpl->parseCurrentBlock();
         }
     } else {
         if ($quota_exceeded) {
             return $quota_exceeded;
         }
     }
     $pending = $this->getPending();
     if ($pending) {
         $f_tpl->setCurrentBlock("pending");
         $f_tpl->setVariable("TXT_PENDING", $lng->txt("file_upload_pending") . ": " . $pending);
         $f_tpl->parseCurrentBlock();
     }
     if ($this->getDisabled() || $quota_exceeded) {
         $f_tpl->setVariable("DISABLED", " disabled=\"disabled\"");
     }
     $f_tpl->setVariable("POST_VAR", $this->getPostVar());
     $f_tpl->setVariable("ID", $this->getFieldId());
     $f_tpl->setVariable("SIZE", $this->getSize());
     return $f_tpl->get();
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:72,代码来源:class.ilFileInputGUI.php

示例2: render

 /**
  * Render html
  */
 function render($a_mode = "")
 {
     global $lng;
     $f_tpl = new ilTemplate("tpl.prop_file.html", true, true, "Services/Form");
     // show filename selection if enabled
     if ($this->isFileNameSelectionEnabled()) {
         $f_tpl->setCurrentBlock('filename');
         $f_tpl->setVariable('POST_FILENAME', $this->getFileNamePostVar());
         $f_tpl->setVariable('VAL_FILENAME', $this->getFilename());
         $f_tpl->setVariable('FILENAME_ID', $this->getFieldId());
         $f_tpl->setVAriable('TXT_FILENAME_HINT', $lng->txt('if_no_title_then_filename'));
         $f_tpl->parseCurrentBlock();
     } else {
         if (trim($this->getValue() != "")) {
             if (!$this->getDisabled() && $this->getALlowDeletion()) {
                 $f_tpl->setCurrentBlock("delete_bl");
                 $f_tpl->setVariable("POST_VAR_D", $this->getPostVar());
                 $f_tpl->setVariable("TXT_DELETE_EXISTING", $lng->txt("delete_existing_file"));
                 $f_tpl->parseCurrentBlock();
             }
             $f_tpl->setCurrentBlock('prop_file_propval');
             $f_tpl->setVariable('FILE_VAL', $this->getValue());
             $f_tpl->parseCurrentBlock();
         }
     }
     if ($a_mode != "toolbar") {
         $this->outputSuffixes($f_tpl);
         $f_tpl->setCurrentBlock("max_size");
         $f_tpl->setVariable("TXT_MAX_SIZE", $lng->txt("file_notice") . " " . $this->getMaxFileSizeString());
         $f_tpl->parseCurrentBlock();
     }
     $pending = $this->getPending();
     if ($pending) {
         $f_tpl->setCurrentBlock("pending");
         $f_tpl->setVariable("TXT_PENDING", $lng->txt("file_upload_pending") . ": " . $pending);
         $f_tpl->parseCurrentBlock();
     }
     $f_tpl->setVariable("POST_VAR", $this->getPostVar());
     $f_tpl->setVariable("ID", $this->getFieldId());
     $f_tpl->setVariable("SIZE", $this->getSize());
     return $f_tpl->get();
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:45,代码来源:class.ilFileInputGUI.php


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