本文整理汇总了PHP中ilTemplate类的典型用法代码示例。如果您正苦于以下问题:PHP ilTemplate类的具体用法?PHP ilTemplate怎么用?PHP ilTemplate使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ilTemplate类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: getMainContent
/**
* Get content HTML for main column.
*/
function getMainContent()
{
global $ilBench, $tree, $ilTabs, $ilAccess;
// see bug #7452
// $ilTabs->setSubTabActive($this->getContainerObject()->getType().'_content');
$tpl = new ilTemplate("tpl.container_page.html", true, true, "Services/Container");
// get all sub items
$ilBench->start("ilContainerGUI", "0100_getSubItems");
$this->items = $this->getContainerObject()->getSubItems($this->getContainerGUI()->isActiveAdministrationPanel());
$ilBench->stop("ilContainerGUI", "0100_getSubItems");
// Show introduction, if repository is empty
// @todo: maybe we move this
if (count($this->items) == 0 && $this->getContainerObject()->getRefId() == ROOT_FOLDER_ID && $ilAccess->checkAccess("write", "", $this->getContainerObject()->getRefId())) {
$html = $this->getIntroduction();
$tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
} else {
$html = $this->renderItemList();
$tpl->setVariable("CONTAINER_PAGE_CONTENT", $html);
}
// @todo: Move this completely to GUI class?
/* $this->getContainerGUI()->adminCommands = $this->adminCommands;
$this->getContainerGUI()->showAdministrationPanel($tpl);
$this->getContainerGUI()->showPossibleSubObjects();
$this->getContainerGUI()->showPermanentLink($tpl);*/
$this->html = $tpl->get();
return $this->html;
}
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:30,代码来源:class.ilContainerByTypeContentGUI.php
示例2: getReport
/**
* Get assignment header for overview
*/
function getReport($a_data)
{
global $lng, $ilCrtl, $ilUser;
$tpl = new ilTemplate("tpl.eph_report_results.html", true, true, "Customizing/global/plugins/Services/Repository/RepositoryObject/Ephorus");
$tpl->setVariable("CONTENT", $a_data);
return $tpl->get();
}
开发者ID:jmcgettrick,项目名称:ilias-ephorus,代码行数:10,代码来源:class.ilEphorusReportGUI.php
示例3: show
function show()
{
global $lng, $tree;
$tpl = new ilTemplate("tpl.container_link_help.html", true, true, "Services/Container");
$type_ordering = array("cat", "fold", "crs", "icrs", "icla", "grp", "chat", "frm", "lres", "glo", "webr", "file", "exc", "tst", "svy", "mep", "qpl", "spl");
$childs = $tree->getChilds($_GET["ref_id"]);
foreach ($childs as $child) {
if (in_array($child["type"], array("lm", "dbk", "sahs", "htlm"))) {
$cnt["lres"]++;
} else {
$cnt[$child["type"]]++;
}
}
$tpl->setVariable("LOCATION_STYLESHEET", ilUtil::getStyleSheetLocation());
$tpl->setVariable("TXT_HELP_HEADER", $lng->txt("help"));
foreach ($type_ordering as $type) {
$tpl->setCurrentBlock("row");
$tpl->setVariable("ROWCOL", "tblrow" . ($i++ % 2 + 1));
if ($type != "lres") {
$tpl->setVariable("TYPE", $lng->txt("objs_" . $type) . " (" . (int) $cnt[$type] . ")");
} else {
$tpl->setVariable("TYPE", $lng->txt("learning_resources") . " (" . (int) $cnt["lres"] . ")");
}
$tpl->setVariable("TXT_LINK", "[list-" . $type . "]");
$tpl->parseCurrentBlock();
}
$tpl->show();
exit;
}
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:29,代码来源:class.ilContainerLinkListGUI.php
示例4: getHtml
/**
* Returns template HTML.
*
* @global ilLanguage $lng
* @return string
*/
public function getHtml()
{
global $lng;
$tpl = new ilTemplate("tpl.chatroom_current_smiley_image.html", true, true, "Modules/Chatroom");
$tpl->setVariable("IMAGE_ALT", $lng->txt("chatroom_current_smiley_image"));
$tpl->setVariable("IMAGE_PATH", $this->value);
return $tpl->get();
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:14,代码来源:class.ilChatroomSmiliesCurrentSmileyFormElement.php
示例5: getHtml
public function getHtml()
{
global $ilCtrl;
$tpl = new ilTemplate("tpl.dcl_tree.html", true, true, "Modules/DataCollection");
$tpl->setVariable("FIELD_ID", $this->getPostVar());
$tpl->setVariable("AJAX_LINK", $ilCtrl->getLinkTargetByClass("ildatacollectionrecordeditgui", "searchObjects"));
$tpl->setVariable("LOADER_PATH", ilUtil::getImagePath("loader.gif"));
return $this->title_input->getToolbarHTML() . "<br /><br />" . $this->search_input->getTableFilterHTML() . $this->hidden_input->getToolbarHTML() . " <a href='#' id='search_button_" . $this->getPostVar() . "'>Search</a>" . $tpl->get();
}
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:9,代码来源:class.ilDataCollectionTreePickInputGUI.php
示例6: getHTML
/**
* Get HTML for calendar
*/
function getHTML()
{
global $lng;
$ftpl = new ilTemplate("tpl.calendar_block_frame.html", true, true, "Services/Calendar");
$tpl = new ilTemplate("tpl.calendar_block.html", true, true, "Services/Calendar");
$this->addMiniMonth($tpl);
$ftpl->setVariable("BLOCK_TITLE", $lng->txt("calendar"));
$ftpl->setVariable("CONTENT", $tpl->get());
return $ftpl->get();
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:13,代码来源:class.ilMiniCalendarGUI.php
示例7: formatHeader
/**
* overwritten method from base class
* @access public
* @param integer obj_id
* @param integer array options
* @return string
*/
function formatHeader($a_obj_id, $a_option)
{
global $lng, $ilias;
$tpl = new ilTemplate("tpl.tree.html", true, true, "Services/UIComponent/Explorer");
$tpl->setCurrentBlock("text");
$tpl->setVariable("OBJ_TITLE", $lng->txt("repository"));
$tpl->parseCurrentBlock();
//$tpl->setCurrentBlock("row");
//$tpl->parseCurrentBlock();
$this->output[] = $tpl->get();
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:18,代码来源:class.ilRoleDesktopItemSelector.php
示例8: getHTML
/**
* Get HTML for calendar
*/
function getHTML()
{
global $lng;
$ftpl = new ilTemplate("tpl.calendar_block_frame.html", true, true, "Services/Calendar");
$tpl = new ilTemplate("tpl.calendar_block.html", true, true, "Services/Calendar");
$this->addMiniMonth($tpl);
$ftpl->setVariable("IMG_BLOCK", ilUtil::getImagePath("icon_cals_s.png"));
$ftpl->setVariable("BLOCK_TITLE", $lng->txt("calendar"));
$ftpl->setVariable("CONTENT", $tpl->get());
$ftpl->setVariable("ALT_BLOCK", $lng->txt("icon") . " " . $lng->txt("calendar"));
return $ftpl->get();
}
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:15,代码来源:class.ilMiniCalendarGUI.php
示例9: getHtml
/**
* @return string
*/
public function getHtml()
{
global $ilCtrl;
$tpl = new ilTemplate("tpl.dcl_tree.html", true, true, "Modules/DataCollection");
$tpl->setVariable("FIELD_ID", $this->getPostVar());
$tpl->setVariable("AJAX_LINK", $ilCtrl->getLinkTargetByClass("ildatacollectionrecordeditgui", "searchObjects"));
$tpl->setVariable("LOADER_PATH", ilUtil::getImagePath("loader.svg"));
$out = $this->title_input->getToolbarHTML();
$out .= "<a href='#' style='display:inline-block;' id='remove_{$this->getPostVar()}'>" . ilGlyphGUI::get(ilGlyphGUI::REMOVE) . "</a>";
$out .= $this->search_input->getTableFilterHTML();
$out .= $this->hidden_input->getToolbarHTML();
$out .= "<a href='#' id='search_button_" . $this->getPostVar() . "'>" . $this->lng->txt('search') . "</a>";
$out .= $tpl->get();
return $out;
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:18,代码来源:class.ilDataCollectionTreePickInputGUI.php
示例10: getHTML
/**
* Render
*/
public function getHTML()
{
global $tpl;
if (!$this->isValid()) {
return;
}
$this->initJS();
$chart = new ilTemplate("tpl.grid2.html", true, true, "Services/Chart");
$chart->setVariable("ID", $this->id);
$chart->setVariable("WIDTH", $this->width);
$chart->setVariable("HEIGHT", $this->height);
$data = array();
foreach ($this->data as $idx => $series) {
$data[] = $series->getData();
}
include_once "./Services/JSON/classes/class.ilJsonUtil.php";
$cfg = array();
$cfg["series"] = array("bubbles" => array("active" => true, "show" => true, "bubblelabel" => array("show" => true), "linewidth" => 2));
$cfg["grid"] = array("hoverable" => true, "clickable" => true, "editable" => true);
if ($ticks = $this->getTicks()) {
foreach ($ticks as $axis => $def) {
if (is_array($def)) {
foreach ($def as $k => $v) {
$cfg[$axis . "axis"]["ticks"][] = array($k, $v);
}
}
}
}
if ($this->x_min !== false) {
$cfg["xaxis"]["min"] = $this->x_min;
}
if ($this->x_max !== false) {
$cfg["xaxis"]["max"] = $this->x_max;
}
if ($this->y_min !== false) {
$cfg["yaxis"]["min"] = $this->y_min;
}
if ($this->y_max !== false) {
$cfg["yaxis"]["max"] = $this->y_max;
}
//ticks: [[1, "m"], [2, "n"], [3, "o"], [4, "p"], [5, "q"], [6, "r"], [7, "s"]]
//echo ilJsonUtil::encode($cfg);
$chart->setVariable("CFG", ilJsonUtil::encode($cfg));
$chart->setVariable("DATA", ilJsonUtil::encode($data));
$ret = $chart->get();
//echo htmlentities($ret);
return $ret;
}
开发者ID:bheyser,项目名称:qplskl,代码行数:51,代码来源:class.ilChartBubble.php
示例11: render
function render()
{
global $ilUser;
$tpl = new ilTemplate("tpl.prop_datetime.html", true, true, "Services/Form");
$tpl->setCurrentBlock("prop_time");
if ($this->getMode() == self::MODE_SELECT) {
if (is_a($this->getDate(), 'ilDate')) {
$date_info = $this->getDate()->get(IL_CAL_FKT_GETDATE, '', 'UTC');
} elseif (is_a($this->getDate(), 'ilDateTime')) {
$date_info = $this->getDate()->get(IL_CAL_FKT_GETDATE, '', $ilUser->getTimeZone());
} else {
$this->setDate(new ilDateTime(time(), IL_CAL_UNIX));
$date_info = $this->getDate()->get(IL_CAL_FKT_GETDATE, '', $ilUser->getTimeZone());
}
// display invalid input again
if (is_array($this->invalid_input)) {
$date_info['year'] = $this->invalid_input['y'];
$date_info['mon'] = $this->invalid_input['m'];
$date_info['mday'] = $this->invalid_input['d'];
}
}
if ($this->getMode() == self::MODE_SELECT) {
$tpl->setVariable("TIME_SELECT", ilUtil::makeTimeSelect($this->getPostVar() . "[time]", !$this->getShowSeconds(), $date_info['hours'], $date_info['minutes'], $date_info['seconds'], true, array('minute_steps' => $this->getMinuteStepSize(), 'disabled' => $this->getDisabled())));
}
$tpl->parseCurrentBlock();
return $tpl->get();
}
开发者ID:studer-raimann,项目名称:RoomSharing,代码行数:27,代码来源:class.ilRoomSharingTimeInputGUI.php
示例12: insert
public function insert($a_tpl)
{
global $lng;
$subtpl = new ilTemplate("tpl.mail_new_placeholders.html", false, false, "Services/Mail");
$subtpl->setVariable('TXT_USE_PLACEHOLDERS', $lng->txt('mail_nacc_use_placeholder'));
$subtpl->setVariable('TXT_PLACEHOLDERS_ADVISE', sprintf($lng->txt('placeholders_advise'), '<br />'));
$subtpl->setVariable('TXT_MAIL_SALUTATION', $lng->txt('mail_nacc_salutation'));
$subtpl->setVariable('TXT_FIRST_NAME', $lng->txt('firstname'));
$subtpl->setVariable('TXT_LAST_NAME', $lng->txt('lastname'));
$subtpl->setVariable('TXT_LOGIN', $lng->txt('mail_nacc_login'));
$subtpl->setVariable('TXT_ILIAS_URL', $lng->txt('mail_nacc_ilias_url'));
$subtpl->setVariable('TXT_CLIENT_NAME', $lng->txt('mail_nacc_client_name'));
$a_tpl->setCurrentBlock("prop_generic");
$a_tpl->setVariable("PROP_GENERIC", $subtpl->get());
$a_tpl->parseCurrentBlock();
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:16,代码来源:class.ilMailFormPlaceholdersPropertyGUI.php
示例13: renderFullscreen
protected function renderFullscreen()
{
global $tpl, $lng, $ilMainMenu;
if (!ilImprint::isActive()) {
ilUtil::redirect("ilias.php?baseClass=ilPersonalDesktopGUI");
}
$tpl->getStandardTemplate();
$this->setRawPageContent(true);
$html = $this->showPage();
$itpl = new ilTemplate("tpl.imprint.html", true, true, "Services/Imprint");
$itpl->setVariable("PAGE_TITLE", $lng->txt("imprint"));
$itpl->setVariable("IMPRINT", $html);
unset($html);
$tpl->setContent($itpl->get());
$ilMainMenu->showLogoOnly(true);
echo $tpl->show("DEFAULT", true, false);
exit;
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:18,代码来源:class.ilImprintGUI.php
示例14: showVirtualPassCmd
private function showVirtualPassCmd()
{
$testSession = $this->testSessionFactory->getSession();
if (!$this->object->getShowPassDetails()) {
$executable = $this->object->isExecutable($testSession, $testSession->getUserId());
if ($executable["executable"]) {
$this->ctrl->redirectByClass("ilobjtestgui", "infoScreen");
}
}
$this->tabs->setBackTarget($this->lng->txt('tst_results_back_introduction'), $this->ctrl->getLinkTargetByClass('ilobjtestgui', 'participants'));
$toolbar = $this->buildUserTestResultsToolbarGUI();
$this->ctrl->setParameter($this, 'pdf', '1');
$toolbar->setPdfExportLinkTarget($this->ctrl->getLinkTarget($this, 'showVirtualPass'));
$this->ctrl->setParameter($this, 'pdf', '');
$toolbar->build();
$virtualSequence = $this->service->buildVirtualSequence($testSession);
$userResults = $this->service->getVirtualSequenceUserResults($virtualSequence);
require_once 'Modules/Course/classes/Objectives/class.ilLOTestQuestionAdapter.php';
$objectivesAdapter = ilLOTestQuestionAdapter::getInstance($testSession);
$objectivesList = $this->buildQuestionRelatedObjectivesList($objectivesAdapter, $virtualSequence);
$objectivesList->loadObjectivesTitles();
require_once 'Modules/Test/classes/class.ilTestResultHeaderLabelBuilder.php';
$testResultHeaderLabelBuilder = new ilTestResultHeaderLabelBuilder($this->lng, $this->objCache);
$testResultHeaderLabelBuilder->setObjectiveOrientedContainerId($testSession->getObjectiveOrientedContainerId());
$testResultHeaderLabelBuilder->setUserId($testSession->getUserId());
$testResultHeaderLabelBuilder->setTestObjId($this->object->getId());
$testResultHeaderLabelBuilder->setTestRefId($this->object->getRefId());
$testResultHeaderLabelBuilder->initObjectiveOrientedMode();
$tpl = new ilTemplate('tpl.il_as_tst_virtual_pass_details.html', false, false, 'Modules/Test');
$tpl->setVariable("TEXT_HEADING", $testResultHeaderLabelBuilder->getVirtualPassDetailsHeaderLabel($objectivesList->getUniqueObjectivesString()));
$command_solution_details = "";
if ($this->object->getShowSolutionDetails()) {
$command_solution_details = "outCorrectSolution";
}
$questionAnchorNav = false;
if ($this->object->canShowSolutionPrintview()) {
$questionAnchorNav = true;
$list_of_answers = $this->getPassListOfAnswers($userResults, $testSession->getActiveId(), null, $this->object->getShowSolutionListComparison(), false, false, false, true, $objectivesList, $testResultHeaderLabelBuilder);
$tpl->setVariable("LIST_OF_ANSWERS", $list_of_answers);
}
$overview = $this->getPassDetailsOverview($userResults, $testSession->getActiveId(), null, $this, "showVirtualPass", $command_solution_details, $questionAnchorNav, $objectivesList);
$tpl->setVariable("PASS_DETAILS", $overview);
$this->populateContent($this->ctrl->getHTML($toolbar) . $tpl->get());
}
开发者ID:bheyser,项目名称:qplskl,代码行数:44,代码来源:class.ilTestEvalObjectiveOrientedGUI.php
示例15: showLangSel
/**
* shows language select box
*/
function showLangSel($a_name, $a_value = "")
{
$tpl = new ilTemplate("tpl.lang_selection.html", true, true, "Services/MetaData");
$languages = ilMDLanguageItem::_getLanguages();
foreach ($languages as $code => $text) {
$tpl->setCurrentBlock("lg_option");
$tpl->setVariable("VAL_LG", $code);
$tpl->setVariable("TXT_LG", $text);
if ($a_value != "" && $a_value == $code) {
$tpl->setVariable("SELECTED", "selected");
}
$tpl->parseCurrentBlock();
}
$tpl->setVariable("TXT_PLEASE_SELECT", $this->lng->txt("meta_please_select"));
$tpl->setVariable("SEL_NAME", $a_name);
$return = $tpl->get();
unset($tpl);
return $return;
}
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:22,代码来源:class.ilBibItemGUI.php
示例16: showCmd
private function showCmd()
{
$selectedSkillProfile = ilTestSkillEvaluationToolbarGUI::fetchSkillProfileParam($_POST);
$testSession = $this->testSessionFactory->getSession();
$this->skillEvaluation->init()->evaluate($testSession->getActiveId(), $testSession->getLastFinishedPass(), $testSession->getUserId());
$evaluationToolbarGUI = $this->buildEvaluationToolbarGUI($testSession->getUserId(), $selectedSkillProfile);
$personalSkillsGUI = $this->buildPersonalSkillsGUI($testSession->getUserId(), $selectedSkillProfile);
$this->tpl->setContent($this->ctrl->getHTML($evaluationToolbarGUI) . $this->ctrl->getHTML($personalSkillsGUI));
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:9,代码来源:class.ilTestSkillEvaluationGUI.php
示例17: save
/**
* Save config
*/
public function save()
{
$form = new ilCertificateConfigFormGUI($this);
if ($form->saveObject()) {
ilUtil::sendSuccess($this->pl->txt('msg_save_config'), true);
$this->ctrl->redirect($this, 'configure');
} else {
$form->setValuesByPost();
$this->tpl->setContent($form->getHTML());
}
}
开发者ID:studer-raimann,项目名称:Certificate,代码行数:14,代码来源:class.ilCertificateConfigGUI.php
示例18: showSkillThresholdsCmd
private function showSkillThresholdsCmd()
{
$table = $this->buildTableGUI();
$skillLevelThresholdList = $this->buildSkillLevelThresholdList();
$skillLevelThresholdList->loadFromDb();
$table->setSkillLevelThresholdList($skillLevelThresholdList);
$assignmentList = $this->buildSkillQuestionAssignmentList();
$assignmentList->loadFromDb();
$table->setData($assignmentList->getUniqueAssignedSkills());
$this->tpl->setContent($this->ctrl->getHTML($table));
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:11,代码来源:class.ilTestSkillLevelThresholdsGUI.php
示例19: showAttachments
public function showAttachments()
{
/**
* @var $ilToolbar ilToolbarGUI
*/
global $ilToolbar;
$this->tpl->setTitle($this->lng->txt('mail'));
require_once 'Services/Form/classes/class.ilFileInputGUI.php';
$attachment = new ilFileInputGUI($this->lng->txt('upload'), 'userfile');
$attachment->setRequired(true);
$attachment->setSize(20);
$ilToolbar->setFormAction($this->ctrl->getFormAction($this, 'uploadFile'), true);
$ilToolbar->addInputItem($attachment);
$ilToolbar->addFormButton($this->lng->txt('upload'), 'uploadFile');
require_once 'Services/Mail/classes/class.ilMailAttachmentTableGUI.php';
$table = new ilMailAttachmentTableGUI($this, 'showAttachments');
$mailData = $this->umail->getSavedData();
$files = $this->mfile->getUserFilesData();
$data = array();
$counter = 0;
foreach ($files as $file) {
$checked = false;
if (is_array($mailData['attachments']) && in_array($file['name'], $mailData['attachments'])) {
$checked = true;
}
$data[$counter] = array('checked' => $checked, 'filename' => $file['name'], 'filesize' => (int) $file['size'], 'filecreatedate' => (int) $file['ctime']);
++$counter;
}
$table->setData($data);
$this->tpl->setContent($table->getHtml());
$this->tpl->show();
}
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:32,代码来源:class.ilMailAttachmentGUI.php
示例20: showPasswordFormCmd
private function showPasswordFormCmd()
{
require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
require_once 'Services/Form/classes/class.ilPasswordInputGUI.php';
$form = new ilPropertyFormGUI();
$form->setTitle($this->lng->txt("tst_password_form"));
$form->setDescription($this->lng->txt("tst_password_introduction"));
$form->setFormAction($this->ctrl->getFormAction($this));
$form->addCommandButton(self::CMD_SAVE_ENTERED_PASSWORD, $this->lng->txt("submit"));
$form->addCommandButton(self::CMD_BACK_TO_INFO_SCREEN, $this->lng->txt("cancel"));
$inp = new ilPasswordInputGUI($this->lng->txt("tst_password"), 'password');
$inp->setRequired(true);
$inp->setRetype(false);
$form->addItem($inp);
$this->tpl->setVariable($this->parentGUI->getContentBlockName(), $this->ctrl->getHTML($form));
}
开发者ID:arlendotcn,项目名称:ilias,代码行数:16,代码来源:class.ilTestPasswordProtectionGUI.php
注:本文中的ilTemplate类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论