本文整理匯總了PHP中ilTemplate::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilTemplate::get方法的具體用法?PHP ilTemplate::get怎麽用?PHP ilTemplate::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ilTemplate
的用法示例。
在下文中一共展示了ilTemplate::get方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: 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();
}
示例2: render
/**
* @return string
*/
protected function render()
{
$tpl = new ilTemplate('./Customizing/global/plugins/Services/Repository/RepositoryObject/RoomSharing/templates/default/utils/tpl.hours_input.html', false, false);
// echo '<pre>' . print_r($this->getHours(), 1) . '</pre>';
// echo '<pre>' . print_r($this->getMinutes(), 1) . '</pre>';
$tpl->setVariable('POSTVAR', $this->getPostVar());
for ($x = 0; $x < 24; $x++) {
$tpl->setCurrentBlock('hour');
if ($x == $this->getHours()) {
$tpl->setVariable('SELECTED', "selected=selected");
}
$tpl->setVariable('VAL', $x);
$tpl->setVariable('DISPLAY', str_pad($x, 2, '0', STR_PAD_LEFT));
$tpl->parseCurrentBlock();
}
for ($x = 0; $x < 60; $x = $x + 5) {
$tpl->setCurrentBlock('minute');
if ($this->getMinutes() >= $x and $this->getMinutes() < $x + 5) {
$tpl->setVariable('SELECTED', "selected=selected");
}
$tpl->setVariable('VAL', $x);
$tpl->setVariable('DISPLAY', str_pad($x, 2, '0', STR_PAD_LEFT));
$tpl->parseCurrentBlock();
}
return $tpl->get();
}
示例3: generateDBUpdateForInstallation
public function generateDBUpdateForInstallation()
{
$tpl = new ilTemplate(dirname(__FILE__) . '/templates/dbupdate.txt', true, true);
$ar = $this->getAr();
$tpl->setVariable('TABLE_NAME', $ar->getConnectorContainerName());
$tpl->setVariable('TABLE_NAME2', $ar->getConnectorContainerName());
$tpl->setVariable('TABLE_NAME3', $ar->getConnectorContainerName());
$tpl->setVariable('STEP', $this->getStep());
$tpl->setVariable('PRIMARY', $this->getAr()->getArFieldList()->getPrimaryFieldName());
foreach ($this->getAr()->getArFieldList()->getFields() as $field) {
$tpl->touchBlock('field');
$tpl->setVariable('FIELD_NAME', $field->getName());
foreach ($field->getAttributesForConnector() as $name => $value) {
$tpl->setCurrentBlock('attribute');
$tpl->setVariable('NAME', arFieldList::mapKey($name));
$tpl->setVariable('VALUE', $value);
$tpl->parseCurrentBlock();
}
}
if ($this->getAr()->getArFieldList()->getPrimaryField()->getFieldType() == arField::FIELD_TYPE_INTEGER) {
$tpl->setCurrentBlock('attribute');
$tpl->setVariable('TABLE_NAME4', $ar->getConnectorContainerName());
$tpl->parseCurrentBlock();
}
header('Content-type: application/x-httpd-php');
header("Content-Disposition: attachment; filename=\"dbupdate.php\"");
echo $tpl->get();
exit;
}
示例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();
}
示例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();
}
示例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();
}
示例7: perminfo
/**
* cmd function
*/
function perminfo()
{
$tpl = new ilTemplate("tpl.info_layout.html", false, false, "Services/AccessControl");
$tpl->setVariable("INFO_SUMMARY", $this->accessStatusInfo());
$tpl->setVariable("INFO_PERMISSIONS", $this->accessPermissionsTable());
$tpl->setVariable("INFO_ROLES", $this->availableRolesTable());
$tpl->setVariable("INFO_REMARK_INTERRUPTED", $this->lng->txt('info_remark_interrupted'));
$this->tpl->setVariable("ADM_CONTENT", $tpl->get());
$this->addToolbar();
}
示例8: insert
public function insert($a_tpl)
{
$tpl = new ilTemplate('tpl.mail_new_attachments.html', true, true, 'Services/Mail');
foreach ($this->items as $item) {
$tpl->setCurrentBlock('attachment_list_item');
$tpl->setVariable('ATTACHMENT_LABEL', $item);
$tpl->parseCurrentBlock();
}
$tpl->setVariable('ATTACHMENT_BUTTON_LABEL', $this->buttonLabel);
$a_tpl->setCurrentBlock("prop_generic");
$a_tpl->setVariable("PROP_GENERIC", $tpl->get());
$a_tpl->parseCurrentBlock();
}
示例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;
}
示例10: configure
/**
* Configure screen
*/
public function configure()
{
$form = new ilCertificateConfigFormGUI($this);
$form->fillForm();
$ftpl = new ilTemplate('tpl.config_form.html', true, true, $this->pl->getDirectory());
$ftpl->setVariable("FORM", $form->getHTML());
$ftpl->setVariable("TXT_USE_PLACEHOLDERS", $this->pl->txt('txt_use_placeholders'));
foreach (srCertificateStandardPlaceholders::getStandardPlaceholders() as $placeholder => $text) {
$ftpl->setCurrentBlock("placeholder");
$ftpl->setVariable("PLACEHOLDER", $placeholder);
$ftpl->setVariable("TXT_PLACEHOLDER", $text);
$ftpl->parseCurrentBlock();
}
$this->tpl->setContent($ftpl->get());
}
示例11: getHTML
function getHTML()
{
global $ilObjDataCache;
$tpl = new ilTemplate('tpl.search_user_filter.html', true, true, 'Services/Search');
$tpl->setVariable("FILTER_ACTION", $this->ctrl->getFormAction($this));
$tpl->setVariable("TBL_TITLE", $this->lng->txt('trac_lp_filter'));
$tpl->setVariable("TXT_LOGIN", $this->lng->txt('login'));
$tpl->setVariable("TXT_FIRSTNAME", $this->lng->txt('firstname'));
$tpl->setVariable("TXT_LASTNAME", $this->lng->txt('lastname'));
$tpl->setVariable("BTN_REFRESH", $this->lng->txt('trac_refresh'));
$tpl->setVariable("QUERY", ilUtil::prepareFormOutput($this->filter->getQueryString('login')));
$tpl->setVariable("FIRSTNAME", ilUtil::prepareFormOutput($this->filter->getQueryString('firstname')));
$tpl->setVariable("LASTNAME", ilUtil::prepareFormOutput($this->filter->getQueryString('lastname')));
return $tpl->get();
}
示例12: render
/**
* Render output
*/
function render()
{
global $lng;
$tpl = new ilTemplate("tpl.prop_captchainput.html", true, true, "Services/Captcha");
if (strlen($this->getValue())) {
$tpl->setCurrentBlock("prop_text_propval");
$tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
$tpl->parseCurrentBlock();
}
include_once "./Services/Captcha/classes/class.ilSecurImageUtil.php";
$tpl->setVariable("IMAGE_SCRIPT", ilSecurImageUtil::getImageScript());
$tpl->setVariable("POST_VAR", $this->getPostVar());
$tpl->setVariable("TXT_CONSTR_PROP", $lng->txt("cont_constrain_proportions"));
// $GLOBALS["tpl"]->addJavascript("./Services/MediaObjects/js/ServiceMediaObjectPropWidthHeight.js");
return $tpl->get();
}
示例13: 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();
}
示例14: render
/**
* Render item
* (modified class name in links and respect disabled status)
*/
function render($a_mode = "property_form")
{
global $lng, $ilCtrl, $ilObjDataCache, $tree;
// modification:
$tpl = new ilTemplate("tpl.prop_glos_select.html", true, true, "Customizing/global/plugins/Services/Repository/RepositoryObject/Flashcards");
// modification.
$tpl->setVariable("POST_VAR", $this->getPostVar());
$tpl->setVariable("ID", $this->getFieldId());
$tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
// modification:
if (!$this->getDisabled()) {
switch ($a_mode) {
case "property_form":
$parent_gui = "ilpropertyformgui";
break;
case "table_filter":
$parent_gui = get_class($this->getParent());
break;
}
$ilCtrl->setParameterByClass("ilglossaryselectorinputgui", "postvar", $this->getPostVar());
$tpl->setVariable("TXT_SELECT", $this->getSelectText());
$tpl->setVariable("HREF_SELECT", $ilCtrl->getLinkTargetByClass(array($parent_gui, "ilformpropertydispatchgui", "ilglossaryselectorinputgui"), "showRepositorySelection"));
if ($this->getValue() > 0) {
$tpl->setVariable("TXT_RESET", $lng->txt("reset"));
$tpl->setVariable("HREF_RESET", $ilCtrl->getLinkTargetByClass(array($parent_gui, "ilformpropertydispatchgui", "ilglossaryselectorinputgui"), "reset"));
}
}
// modification.
if ($this->getValue() > 0 && $this->getValue() != ROOT_FOLDER_ID) {
// modification:
require_once "Services/Locator/classes/class.ilLocatorGUI.php";
$loc_gui = new ilLocatorGUI();
$loc_gui->addContextItems($this->getValue());
$tpl->setVariable("TXT_ITEM", $loc_gui->getHTML());
// modification.
} else {
$nd = $tree->getNodeData(ROOT_FOLDER_ID);
$title = $nd["title"];
if ($title == "ILIAS") {
$title = $lng->txt("repository");
}
if (in_array($nd["type"], $this->getClickableTypes())) {
$tpl->setVariable("TXT_ITEM", $title);
}
}
return $tpl->get();
}
示例15: insert
public function insert($a_tpl)
{
global $lng;
$subtpl = new ilTemplate("tpl.invoice_number_placeholders.html", false, false, "Services/Payment");
$subtpl->setVariable('TXT_USE_PLACEHOLDERS', $lng->txt('placeholders'));
$subtpl->setVariable('TXT_PLACEHOLDERS_ADVICE', $lng->txt('inv_number_placeholder_advice'));
$subtpl->setVariable('TXT_CURRENT_TIMESTAMP', $lng->txt('current_timestamp'));
$subtpl->setVariable('TXT_INSTALLATION_ID', $lng->txt('installation_id'));
$subtpl->setVariable('TXT_USER_ID', $lng->txt('user_id'));
$subtpl->setVariable('TXT_DAY', $lng->txt('day'));
$subtpl->setVariable('TXT_MONTH', $lng->txt('month'));
$subtpl->setVariable('TXT_YEAR', $lng->txt('year'));
$subtpl->setVariable('TXT_INCREMENTAL_NUMBER', $lng->txt('incremental_number'));
$a_tpl->setCurrentBlock("prop_generic");
$a_tpl->setVariable("PROP_GENERIC", $subtpl->get());
$a_tpl->parseCurrentBlock();
}