本文整理汇总了PHP中ilUtil::img方法的典型用法代码示例。如果您正苦于以下问题:PHP ilUtil::img方法的具体用法?PHP ilUtil::img怎么用?PHP ilUtil::img使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilUtil
的用法示例。
在下文中一共展示了ilUtil::img方法的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;
}
}
}
示例2: fillRow
/**
* Fill table row
*/
protected function fillRow($a_set)
{
global $lng, $ilCtrl, $ilUser;
include_once "./Services/Skill/classes/class.ilPersonalSkill.php";
$mat = ilPersonalSkill::getAssignedMaterial($ilUser->getId(), $this->tref_id, $a_set["id"]);
$ilCtrl->setParameter($this->parent_obj, "level_id", $a_set["id"]);
foreach ($mat as $m) {
$this->tpl->setCurrentBlock("mat");
$obj_id = $this->ws_tree->lookupObjectId($m["wsp_id"]);
$this->tpl->setVariable("MAT_TITLE", ilObject::_lookupTitle($obj_id));
$this->tpl->setVariable("MAT_IMG", ilUtil::img(ilUtil::getImagePath("icon_" . ilObject::_lookupType($obj_id) . ".svg")));
$this->tpl->setVariable("TXT_REMOVE", $lng->txt("remove"));
$ilCtrl->setParameter($this->parent_obj, "wsp_id", $m["wsp_id"]);
$this->tpl->setVariable("HREF_REMOVE", $ilCtrl->getLinkTarget($this->parent_obj, "removeMaterial"));
$obj_id = $this->ws_tree->lookupObjectId($m["wsp_id"]);
$url = $this->ws_access->getGotoLink($m["wsp_id"], $obj_id);
$this->tpl->setVariable("HREF_MAT", $url);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("cmd");
$this->tpl->setVariable("HREF_CMD", $ilCtrl->getLinkTarget($this->parent_obj, "assignMaterial"));
$this->tpl->setVariable("TXT_CMD", $lng->txt("skmg_assign_materials"));
$this->tpl->parseCurrentBlock();
$ilCtrl->setParameter($this->parent_obj, "level_id", "");
$this->tpl->setVariable("LEVEL_ID", $a_set["id"]);
$this->tpl->setVariable("SKILL_ID", $this->basic_skill_id);
$this->tpl->setVariable("TXT_SKILL", $a_set["title"]);
$this->tpl->setVariable("TXT_SKILL_DESC", $a_set["description"]);
}
示例3: parseData
protected function parseData()
{
$this->determineOffsetAndOrder();
$this->determineLimit();
$xdglRequestList = ilUserSetting::getCollection();
$xdglRequestList->orderBy($this->getOrderField(), $this->getOrderDirection());
$xdglRequestList->innerjoin('object_data', 'global_role', 'obj_id', array('title'));
foreach ($this->filter as $field => $value) {
if ($value) {
$xdglRequestList->where(array($field => $value));
}
}
$this->setMaxCount($xdglRequestList->count());
if (!$xdglRequestList->hasSets()) {
// ilUtil::sendInfo('Keine Ergebnisse für diesen Filter');
}
$xdglRequestList->limit($this->getOffset(), $this->getOffset() + $this->getLimit());
$xdglRequestList->orderBy('title');
$a_data = $xdglRequestList->getArray();
if (ilUserDefaultsPlugin::is50()) {
$img_on = ilUtil::img(ilUtil::getImagePath('icon_ok.svg'));
$img_off = ilUtil::img(ilUtil::getImagePath('icon_not_ok.svg'));
} else {
$img_on = ilUtil::img(ilUtil::getImagePath('icon_led_on_s.png'));
$img_off = ilUtil::img(ilUtil::getImagePath('icon_led_off_s.png'));
}
foreach ($a_data as $k => $d) {
$a_data[$k]['status_image'] = $d['status'] == ilUserSetting::STATUS_ACTIVE ? $img_on : $img_off;
}
$this->setData($a_data);
}
示例4: fillRow
/**
* Fill table row
*/
protected function fillRow($a_set)
{
global $lng;
//var_dump($a_set);
$this->tpl->setVariable("ICON", ilUtil::img(ilObject::_getIcon($a_set["obj_id"], "tiny"), $a_set["type_txt"]));
$this->tpl->setVariable("TITLE", $a_set["title"]);
$this->tpl->setVariable("CMD", $a_set["cmd"]);
}
示例5: getHTML
public function getHTML()
{
global $ilCtrl, $tpl, $lng, $ilUser;
if (!$this->isContainer) {
#return '';
}
if ($_GET['baseClass'] == 'ilSearchController') {
// return '';
}
include_once "Services/jQuery/classes/class.iljQueryUtil.php";
iljQueryUtil::initjQuery();
iljQueryUtil::initjQueryUI();
$this->tpl = new ilTemplate('tpl.main_menu_search.html', true, true, 'Services/Search');
if ($ilUser->getId() != ANONYMOUS_USER_ID) {
if (ilSearchSettings::getInstance()->isLuceneUserSearchEnabled() or (int) $_GET['ref_id']) {
$this->tpl->setCurrentBlock("position");
$this->tpl->setVariable('TXT_GLOBALLY', $lng->txt("search_globally"));
$this->tpl->setVariable('ROOT_ID', ROOT_FOLDER_ID);
$this->tpl->parseCurrentBlock();
} else {
$this->tpl->setCurrentBlock("position_hid");
$this->tpl->setVariable('ROOT_ID_HID', ROOT_FOLDER_ID);
$this->tpl->parseCurrentBlock();
}
if ((int) $_GET['ref_id']) {
$this->tpl->setCurrentBlock('position_rep');
$this->tpl->setVariable('TXT_CURRENT_POSITION', $lng->txt("search_at_current_position"));
$this->tpl->setVariable('REF_ID', (int) $_GET["ref_id"]);
$this->tpl->parseCurrentBlock();
}
}
if ($ilUser->getId() != ANONYMOUS_USER_ID && ilSearchSettings::getInstance()->isLuceneUserSearchEnabled()) {
$this->tpl->setCurrentBlock('usr_search');
$this->tpl->setVariable('TXT_USR_SEARCH', $this->lng->txt('search_users'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable('FORMACTION', 'ilias.php?baseClass=ilSearchController&cmd=post' . '&rtoken=' . $ilCtrl->getRequestToken() . '&fallbackCmd=remoteSearch');
$this->tpl->setVariable('BTN_SEARCH', $this->lng->txt('search'));
// $this->tpl->setVariable('ID_AUTOCOMPLETE', "mm_sr_auto");
$this->tpl->setVariable('AC_DATASOURCE', "ilias.php?baseClass=ilSearchController&cmd=autoComplete");
$this->tpl->setVariable('IMG_MM_SEARCH', ilUtil::img(ilUtil::getImagePath("icon_seas.svg"), $lng->txt("search")));
if ($ilUser->getId() != ANONYMOUS_USER_ID) {
$this->tpl->setVariable('HREF_SEARCH_LINK', "ilias.php?baseClass=ilSearchController");
$this->tpl->setVariable('TXT_SEARCH_LINK', $lng->txt("last_search_result"));
}
// #10555 - we need the overlay for the autocomplete which is always active
$this->tpl->setVariable('TXT_SEARCH', $lng->txt("search"));
include_once "./Services/UIComponent/Overlay/classes/class.ilOverlayGUI.php";
$ov = new ilOverlayGUI("mm_search_menu");
//$ov->setTrigger("main_menu_search", "none",
// "main_menu_search", "tr", "br");
//$ov->setAnchor("main_menu_search", "tr", "br");
$ov->setAutoHide(false);
$ov->add();
return $this->tpl->get();
}
示例6: fillRow
/**
* fill row
*
* @access public
* @param $a_set
*/
public function fillRow($a_set)
{
global $ilCtrl;
$ilObjEntry = new ilBibliographicEntry($this->parent_obj->object->getFiletype(), $a_set['entry_id']);
$this->tpl->setVariable("SINGLE_ENTRY", $ilObjEntry->getOverwiew());
//Detail-Link
$ilCtrl->setParameterByClass("ilObjBibliographicGUI", "entryId", $a_set['entry_id']);
$this->tpl->setVariable("DETAIL_LINK", $ilCtrl->getLinkTargetByClass("ilObjBibliographicGUI", "showDetails"));
$this->tpl->setVariable("VIEW_IMAGE_SRC", ilUtil::img(ilUtil::getImagePath("cmd_view_s.png")));
}
示例7: fillRow
/**
* Fill table row
*/
protected function fillRow($a_set)
{
global $lng, $objDefinition;
$img = ilObject::_getIcon($obj_id, "small", $a_set["type"]);
if (is_file($img)) {
$alt = $objDefinition->isPlugin($a_set["type"]) ? $lng->txt("icon") . " " . ilPlugin::lookupTxt("rep_robj", $a_set["type"], "obj_" . $a_set["type"]) : $lng->txt("icon") . " " . $lng->txt("obj_" . $a_set["type"]);
$this->tpl->setVariable("IMG_TYPE", ilUtil::img($img, $alt));
}
$this->tpl->setVariable("ID", $a_set["ref_id"]);
$this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
$this->tpl->setVariable("VAL_LAST_CHANGE", $a_set["last_update"]);
}
示例8: fillRow
/**
* Fill table row
*/
protected function fillRow($a_set)
{
global $lng;
$this->tpl->setVariable("FILENAME", $a_set["filename"]);
$piname = pathinfo($a_set["filename"]);
$th_path = ilObjMediaObject::getThumbnailPath($this->mob->getId(), basename($a_set["filename"], "." . $piname['extension']) . ".png");
if (!is_file($th_path)) {
$this->mob->makeThumbnail("overlays/" . $a_set["filename"], basename($a_set["filename"], "." . $piname['extension']) . ".png");
}
if (is_file($th_path)) {
$this->tpl->setVariable("THUMB", ilUtil::img($th_path));
}
}
示例9: fillRow
/**
* Fill table row
*/
protected function fillRow($a_set)
{
global $lng;
$this->tpl->setVariable("ITEM_REF_ID", $a_set["child"]);
$this->tpl->setVariable("TITLE", $a_set["title"]);
$this->tpl->setVariable("IMG", ilUtil::img(ilObject::_getIcon($a_set["obj_id"], "tiny")));
if (in_array($a_set["child"], $this->items)) {
$this->tpl->setVariable("IMG_ASSIGNED", ilUtil::img(ilUtil::getImagePath("icon_ok.png")));
$this->tpl->setVariable("CHECKED", "checked='checked'");
} else {
$this->tpl->setVariable("IMG_ASSIGNED", ilUtil::img(ilUtil::getImagePath("icon_not_ok.png")));
}
}
示例10: fillRow
/**
* Fill table row
*/
protected function fillRow($a_set)
{
global $lng, $ilCtrl;
//var_dump($a_set);
// icon...
// check activation
include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
$active = ilLMPage::_lookupActive($a_set["obj_id"], $this->lm->getType(), $this->lm_set->get("time_scheduled_page_activation"));
// is page scheduled?
$img_sc = $this->lm_set->get("time_scheduled_page_activation") && ilLMPage::_isScheduledActivation($a_set["obj_id"], $this->lm->getType()) ? "_sc" : "";
if (!$active) {
$img = "icon_pg_d" . $img_sc . ".svg";
$alt = $lng->txt("cont_page_deactivated");
} else {
if (ilLMPage::_lookupContainsDeactivatedElements($a_set["obj_id"], $this->lm->getType())) {
$img = "icon_pg_del" . $img_sc . ".svg";
$alt = $lng->txt("cont_page_deactivated_elements");
} else {
$img = "icon_pg" . $img_sc . ".svg";
$alt = $this->lng->txt("pg");
}
}
$this->tpl->setVariable("ICON", ilUtil::img(ilUtil::getImagePath($img), $alt));
// title/link
$ilCtrl->setParameter($this, "backcmd", "");
$ilCtrl->setParameterByClass("ilLMPageObjectGUI", "obj_id", $a_set["obj_id"]);
$this->tpl->setVariable("HREF_TITLE", $ilCtrl->getLinkTargetByClass("ilLMPageObjectGUI", "edit"));
$this->tpl->setVariable("TITLE", $a_set["title"]);
$this->tpl->setVariable("ID", $a_set["obj_id"]);
// context
if ($this->lm->lm_tree->isInTree($a_set["obj_id"])) {
$path_str = $this->parent_obj->getContextPath($a_set["obj_id"]);
} else {
$path_str = "---";
}
// check whether page is header or footer
$add_str = "";
if ($a_set["obj_id"] == $this->lm->getHeaderPage()) {
$add_str = " <b>(" . $lng->txt("cont_header") . ")</b>";
}
if ($a_set["obj_id"] == $this->lm->getFooterPage()) {
$add_str .= " <b>(" . $lng->txt("cont_footer") . ")</b>";
}
$this->tpl->setVariable("USAGE", $path_str . $add_str);
// layout
if ($this->lm->getLayoutPerPage()) {
if (($l = ilLMObject::lookupLayout($a_set["obj_id"])) != "") {
$this->tpl->setVariable("LAYOUT", $lng->txt("cont_layout_" . $l));
}
}
}
示例11: fillRow
/**
* Fill table row
*/
protected function fillRow($a_set)
{
global $lng, $tree;
$ref_id = $a_set["rep_ref_id"];
$obj_id = ilObject::_lookupObjId($ref_id);
$this->tpl->setVariable("TITLE", ilObject::_lookupTitle($obj_id));
$this->tpl->setVariable("IMG", ilUtil::img(ilObject::_getIcon($obj_id, "tiny")));
$this->tpl->setVariable("ID", $ref_id);
$path = $tree->getPathFull($ref_id);
$path_items = array();
foreach ($path as $p) {
if ($p["type"] != "root" && $p["child"] != $ref_id) {
$path_items[] = $p["title"];
}
}
$this->tpl->setVariable("PATH", implode($path_items, " > "));
}
示例12: getGroupedListItemsHTML
/**
* @param bool $delete
* @param ilCloudFileNode $node
* @return string $html
*/
public function getGroupedListItemsHTML($showUpload = false, $showCreateFolders = false)
{
global $lng;
include_once "./Services/UIComponent/GroupedList/classes/class.ilGroupedListGUI.php";
$this->gl = new ilGroupedListGUI();
$this->addItemsBefore();
if ($showUpload) {
include_once "Services/FileUpload/classes/class.ilFileUploadGUI.php";
ilFileUploadGUI::initFileUpload();
$icon_path = "./Modules/Cloud/templates/images/icon_file_s.png";
$this->gl->addEntry(ilUtil::img($icon_path) . " " . $lng->txt("cld_add_file"), "javascript:il.CloudFileList.uploadFile();", "_top", "", "", "il_cld_add_file", $lng->txt("cld_info_add_file_to_current_directory"), "bottom center", "top center", false);
}
if ($showCreateFolders) {
$icon_path = "./Modules/Cloud/templates/images/icon_folder_s.png";
$this->gl->addEntry(ilUtil::img($icon_path) . " " . $lng->txt("cld_add_folder"), "javascript:il.CloudFileList.createFolder();", "_top", "", "", "il_cld_add_file", $lng->txt("cld_info_add_folder_to_current_directory"), "bottom center", "top center", false);
}
$this->addItemsAfter();
return $this->gl->getHTML();
}
示例13: 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_postponed) {
if ($data['postponed']) {
$this->tpl->setCurrentBlock('postponed');
$this->tpl->setVariable('POSTPONED', $this->lng->txt('postponed'));
$this->tpl->parseCurrentBlock();
} else {
$this->tpl->setCurrentBlock('postponed');
$this->tpl->touchBlock('postponed');
$this->tpl->parseCurrentBlock();
}
}
if ($this->show_marker) {
if ($data['marked']) {
$this->tpl->setCurrentBlock('marked_img');
$this->tpl->setVariable("HREF_MARKED", ilUtil::img('./templates/default/images/marked.svg', $this->lng->txt("tst_question_marked"), '24px', '24px'));
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock('marker');
$this->tpl->parseCurrentBlock();
} else {
$this->tpl->setCurrentBlock('marker');
$this->tpl->touchBlock('marker');
$this->tpl->parseCurrentBlock();
}
}
// 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']);
}
示例14: getGroupedListItems
/**
* @param bool $show_upload
* @param bool $show_create_folders
*
* @return ilCloudGroupedListGUI
*/
public function getGroupedListItems($show_upload = false, $show_create_folders = false)
{
global $lng;
$this->gl = new ilCloudGroupedListGUI();
$this->addItemsBefore();
$this->gl->setAsDropDown(true);
if ($show_upload) {
ilFileUploadGUI::initFileUpload();
$icon_path = './Modules/Cloud/templates/images/icon_file_s.svg';
$icon_path = ilUtil::getImagePath('icon_file.svg');
$img = ilUtil::img($icon_path);
$a_ttip = $lng->txt('cld_info_add_file_to_current_directory');
$this->gl->addEntry($img . ' ' . $lng->txt('cld_add_file'), 'javascript:il.CloudFileList.uploadFile();', '_top', '', '', 'il_cld_add_file', $a_ttip, 'bottom center', 'top center', false);
}
if ($show_create_folders) {
$icon_path = './Modules/Cloud/templates/images/icon_folder_s.svg';
$icon_path = ilUtil::getImagePath('icon_fold.svg');
$img1 = ilUtil::img($icon_path);
$a_ttip1 = $lng->txt('cld_info_add_folder_to_current_directory');
$this->gl->addEntry($img1 . ' ' . $lng->txt('cld_add_folder'), 'javascript:il.CloudFileList.createFolder();', '_top', '', '', 'il_cld_add_file', $a_ttip1, 'bottom center', 'top center', false);
}
$this->addItemsAfter();
return $this->gl;
}
示例15: fillRow
/**
* Fill table row
*/
protected function fillRow($a_set)
{
global $lng, $ilCtrl;
switch ($a_set["type"]) {
// category
case "scat":
$ilCtrl->setParameterByClass("ilskillcategorygui", "obj_id", $a_set["child"]);
$ret = $ilCtrl->getLinkTargetByClass("ilskillcategorygui", "listItems");
$ilCtrl->setParameterByClass("ilskillcategorygui", "obj_id", $_GET["obj_id"]);
break;
// skill template reference
// skill template reference
case "sktr":
$tid = ilSkillTemplateReference::_lookupTemplateId($a_set["child"]);
$ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "tref_id", $a_set["child"]);
$ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "obj_id", $tid);
$ret = $ilCtrl->getLinkTargetByClass("ilskilltemplatereferencegui", "listItems");
$ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "obj_id", $_GET["obj_id"]);
$ilCtrl->setParameterByClass("ilskilltemplatereferencegui", "tref_id", $_GET["tref_id"]);
break;
// skill
// skill
case "skll":
$ilCtrl->setParameterByClass("ilbasicskillgui", "obj_id", $a_set["child"]);
$ret = $ilCtrl->getLinkTargetByClass("ilbasicskillgui", "edit");
$ilCtrl->setParameterByClass("ilbasicskillgui", "obj_id", $_GET["obj_id"]);
break;
// --------
// template
// --------
// template
case "sktp":
$ilCtrl->setParameterByClass("ilbasicskilltemplategui", "obj_id", $a_set["child"]);
$ret = $ilCtrl->getLinkTargetByClass("ilbasicskilltemplategui", "edit");
$ilCtrl->setParameterByClass("ilbasicskilltemplategui", "obj_id", $_GET["obj_id"]);
break;
// template category
// template category
case "sctp":
$ilCtrl->setParameterByClass("ilskilltemplatecategorygui", "obj_id", $a_set["child"]);
$ret = $ilCtrl->getLinkTargetByClass("ilskilltemplatecategorygui", "listItems");
$ilCtrl->setParameterByClass("ilskilltemplatecategorygui", "obj_id", $_GET["obj_id"]);
break;
}
if ($this->tref_id == 0) {
$this->tpl->setCurrentBlock("cb");
$this->tpl->setVariable("CB_ID", $a_set["child"]);
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("nr");
$this->tpl->setVariable("OBJ_ID", $a_set["child"]);
$this->tpl->setVariable("ORDER_NR", $a_set["order_nr"]);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("HREF_TITLE", $ret);
$this->tpl->setVariable("TITLE", $a_set["title"]);
$icon = ilSkillTreeNode::getIconPath($a_set["child"], $a_set["type"], "", ilSkillTreeNode::_lookupStatus($a_set["child"]));
$this->tpl->setVariable("ICON", ilUtil::img($icon, ""));
}