本文整理汇总了PHP中ilObject::_getIcon方法的典型用法代码示例。如果您正苦于以下问题:PHP ilObject::_getIcon方法的具体用法?PHP ilObject::_getIcon怎么用?PHP ilObject::_getIcon使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilObject
的用法示例。
在下文中一共展示了ilObject::_getIcon方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: prepareOutput
protected function prepareOutput()
{
$this->tpl->getStandardTemplate();
$this->tpl->setTitleIcon(ilObject::_getIcon('', '', 'pays'), $this->lng->txt("shop"));
$this->tpl->setTitle($this->lng->txt("shop"));
ilUtil::infoPanel();
}
示例2: getHTML
/**
* Get HTML for navigation history
*/
function getHTML()
{
global $ilNavigationHistory, $lng;
include_once "./Services/UIComponent/AdvancedSelectionList/classes/class.ilAdvancedSelectionListGUI.php";
$selection = new ilAdvancedSelectionListGUI();
$selection->setFormSelectMode("url_ref_id", "ilNavHistorySelect", true, "goto.php?target=navi_request", "ilNavHistory", "ilNavHistoryForm", "_top", $lng->txt("go"), "ilNavHistorySubmit");
$selection->setListTitle($lng->txt("last_visited"));
$selection->setId("lastvisited");
$selection->setSelectionHeaderClass("MMInactive");
$selection->setHeaderIcon(ilAdvancedSelectionListGUI::NO_ICON);
$selection->setItemLinkClass("small");
$selection->setUseImages(true);
include_once "./Services/Accessibility/classes/class.ilAccessKey.php";
$selection->setAccessKey(ilAccessKey::LAST_VISITED);
$items = $ilNavigationHistory->getItems();
//$sel_arr = array(0 => "-- ".$lng->txt("last_visited")." --");
reset($items);
$cnt = 0;
foreach ($items as $k => $item) {
if ($cnt++ > 20) {
break;
}
if (!isset($item["ref_id"]) || !isset($_GET["ref_id"]) || $item["ref_id"] != $_GET["ref_id"] || $k > 0) {
$obj_id = ilObject::_lookupObjId($item["ref_id"]);
$selection->addItem($item["title"], $item["ref_id"], $item["link"], ilObject::_getIcon($obj_id, "tiny", $item["type"]), $lng->txt("obj_" . $item["type"]), "_top");
}
}
$html = $selection->getHTML();
if ($html == "") {
$selection->addItem($lng->txt("no_items"), "", "#", "", "", "_top");
$selection->setUseImages(false);
$html = $selection->getHTML();
}
return $html;
}
示例3: getSelectableColumns
function getSelectableColumns()
{
global $ilObjDataCache;
$columns = array();
if ($this->obj_ids === NULL) {
$this->obj_ids = $this->getItems();
}
if ($this->obj_ids) {
$tmp_cols = array();
foreach ($this->obj_ids as $obj_id) {
if ($obj_id == $this->obj_id) {
$parent = array("txt" => $this->lng->txt("status"), "default" => true);
} else {
$title = $ilObjDataCache->lookupTitle($obj_id);
$type = $ilObjDataCache->lookupType($obj_id);
$icon = ilObject::_getIcon("", "tiny", $type);
if ($type == "sess") {
include_once "Modules/Session/classes/class.ilObjSession.php";
$sess = new ilObjSession($obj_id, false);
$title = $sess->getPresentationTitle();
}
$tmp_cols[strtolower($title) . "#~#obj_" . $obj_id] = array("txt" => $title, "icon" => $icon, "type" => $type, "default" => true);
}
}
if (sizeof($this->objective_ids)) {
foreach ($this->objective_ids as $obj_id => $title) {
$tmp_cols[strtolower($title) . "#~#objtv_" . $obj_id] = array("txt" => $title, "default" => true);
}
}
if (sizeof($this->sco_ids)) {
foreach ($this->sco_ids as $obj_id => $title) {
$icon = ilUtil::getTypeIconPath("sco", $obj_id, "tiny");
$tmp_cols[strtolower($title) . "#~#objsco_" . $obj_id] = array("txt" => $title, "icon" => $icon, "default" => true);
}
}
// alex, 5 Nov 2011: Do not sort SCORM items
if (!sizeof($this->sco_ids)) {
ksort($tmp_cols);
}
foreach ($tmp_cols as $id => $def) {
$id = explode('#~#', $id);
$columns[$id[1]] = $def;
}
unset($tmp_cols);
if ($parent) {
$columns["obj_" . $this->obj_id] = $parent;
}
}
$columns["status_changed"] = array("txt" => $this->lng->txt("trac_status_changed"), "id" => "status_changed", "default" => false);
include_once 'Services/Tracking/classes/class.ilObjUserTracking.php';
$tracking = new ilObjUserTracking();
if ($tracking->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_LAST_ACCESS)) {
$columns["last_access"] = array("txt" => $this->lng->txt("last_access"), "id" => "last_access", "default" => false);
}
if ($tracking->hasExtendedData(ilObjUserTracking::EXTENDED_DATA_SPENT_SECONDS)) {
$columns["spent_seconds"] = array("txt" => $this->lng->txt("trac_spent_seconds"), "id" => "spent_seconds", "default" => false);
}
return $columns;
}
示例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: prepareOutput
function prepareOutput()
{
global $ilLocator, $lng;
$this->tpl->getStandardTemplate();
// $ilLocator->addItem($this->lng->txt('search'),$this->ctrl->getLinkTarget($this));
// $this->tpl->setLocator();
//$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_src_b.gif"),
// $lng->txt("search"));
$this->tpl->setTitleIcon(ilObject::_getIcon("", "big", "src"), "");
$this->tpl->setTitle($lng->txt("search"));
ilUtil::infoPanel();
}
示例6: getNodeIcon
/**
* Get node icon
* Return custom icon of OrgUnit type if existing
*
* @param array $a_node
*
* @return string
*/
public function getNodeIcon($a_node)
{
global $ilias;
if ($ilias->getSetting('custom_icons')) {
$icons_cache = ilObjOrgUnit::getIconsCache();
$obj_id = ilObject::_lookupObjId($a_node["child"]);
if (isset($icons_cache[$obj_id])) {
return $icons_cache[$obj_id];
}
}
return ilObject::_getIcon($obj_id, "tiny", $a_node["type"]);
}
示例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("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")));
}
}
示例9: render
/**
* Render html
*/
function render($a_mode = "")
{
global $lng, $tpl, $ilUser;
$quota_exceeded = $quota_legend = false;
if (self::$check_wsp_quota) {
include_once "Services/DiskQuota/classes/class.ilDiskQuotaHandler.php";
if (!ilDiskQuotaHandler::isUploadPossible()) {
$lng->loadLanguageModule("file");
return $lng->txt("personal_workspace_quota_exceeded_warning");
} else {
$quota_legend = ilDiskQuotaHandler::getStatusLegend();
}
}
// make sure jQuery is loaded
iljQueryUtil::initjQuery();
// add file upload scripts
include_once "./Services/FileUpload/classes/class.ilFileUploadGUI.php";
ilFileUploadGUI::initFileUpload();
// load template
$this->tpl = new ilTemplate("tpl.prop_dndfiles.html", true, true, "Services/Form");
// general variables
$this->tpl->setVariable("UPLOAD_ID", $this->uniqueId);
// input
$this->tpl->setVariable("FILE_SELECT_ICON", ilObject::_getIcon("", "", "fold"));
$this->tpl->setVariable("TXT_SHOW_ALL_DETAILS", $lng->txt('show_all_details'));
$this->tpl->setVariable("TXT_HIDE_ALL_DETAILS", $lng->txt('hide_all_details'));
$this->tpl->setVariable("TXT_SELECTED_FILES", $lng->txt('selected_files'));
$this->tpl->setVariable("TXT_DRAG_FILES_HERE", $lng->txt('drag_files_here'));
$this->tpl->setVariable("TXT_NUM_OF_SELECTED_FILES", $lng->txt('num_of_selected_files'));
$this->tpl->setVariable("TXT_SELECT_FILES_FROM_COMPUTER", $lng->txt('select_files_from_computer'));
$this->tpl->setVariable("TXT_OR", $lng->txt('logic_or'));
$this->tpl->setVariable("INPUT_ACCEPT_SUFFIXES", $this->getInputAcceptSuffixes($this->getSuffixes()));
// info
$this->tpl->setCurrentBlock("max_size");
$this->tpl->setVariable("TXT_MAX_SIZE", $lng->txt("file_notice") . " " . $this->getMaxFileSizeString());
$this->tpl->parseCurrentBlock();
if ($quota_legend) {
$this->tpl->setVariable("TXT_MAX_SIZE", $quota_legend);
$this->tpl->parseCurrentBlock();
}
$this->outputSuffixes($this->tpl);
// create file upload object
$upload = new ilFileUploadGUI("ilFileUploadDropZone_" . $this->uniqueId, $this->uniqueId, false);
$upload->enableFormSubmit("ilFileUploadInput_" . $this->uniqueId, $this->submit_button_name, $this->cancel_button_name);
$upload->setDropAreaId("ilFileUploadDropArea_" . $this->uniqueId);
$upload->setFileListId("ilFileUploadList_" . $this->uniqueId);
$upload->setFileSelectButtonId("ilFileUploadFileSelect_" . $this->uniqueId);
$this->tpl->setVariable("FILE_UPLOAD", $upload->getHTML());
return $this->tpl->get();
}
示例10: 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, " > "));
}
示例11: getStartObjects
protected function getStartObjects()
{
$data = array();
$counter = 0;
foreach ($this->start_obj->getStartObjects() as $start_id => $item) {
$tmp_obj = ilObjectFactory::getInstanceByRefId($item['item_ref_id']);
$data[$item['item_ref_id']]['id'] = $start_id;
$data[$item['item_ref_id']]['title'] = $tmp_obj->getTitle();
$data[$item['item_ref_id']]['type'] = $this->lng->txt('obj_' . $tmp_obj->getType());
$data[$item['item_ref_id']]['icon'] = ilObject::_getIcon($tmp_obj->getId(), 'tiny');
$counter += 10;
$data[$item['item_ref_id']]['pos'] = $counter;
if (strlen($tmp_obj->getDescription())) {
$data[$item['item_ref_id']]['description'] = $tmp_obj->getDescription();
}
}
return $data;
}
示例12: setConditions
/**
* Set and parse conditions
* @param array $a_conditions
*/
public function setConditions($a_conditions)
{
foreach ((array) $a_conditions as $condition) {
if ($condition['trigger_type'] == 'crsg') {
continue;
}
$row['id'] = $condition['condition_id'];
$row['ref_id'] = $condition['trigger_ref_id'];
$row['type'] = $condition['trigger_type'];
$row['title'] = ilObject::_lookupTitle($condition['trigger_obj_id']);
$row['description'] = ilObject::_lookupDescription($condition['trigger_obj_id']);
$row['icon'] = ilObject::_getIcon($condition['trigger_obj_id']);
$row['icon_alt'] = $this->lng->txt('obj_' . $condition['trigger_type']);
$row['condition'] = $this->lng->txt('condition_' . $condition['operator']);
$row['obligatory'] = $condition['obligatory'];
$rows[] = $row;
}
$this->setData($rows);
}
示例13: showDeleteConfirmation
/**
* Show delete confirmation table
*/
function showDeleteConfirmation($a_ids, $a_supress_message = false)
{
global $lng, $ilSetting, $ilCtrl, $tpl, $objDefinition;
if (!is_array($a_ids) || count($a_ids) == 0) {
ilUtil::sendFailure($lng->txt("no_checkbox"), true);
return false;
}
// Remove duplicate entries
$a_ids = array_unique((array) $a_ids);
include_once "./Services/Utilities/classes/class.ilConfirmationGUI.php";
$cgui = new ilConfirmationGUI();
if (!$a_supress_message) {
$msg = $lng->txt("info_delete_sure");
if (!$ilSetting->get('enable_trash')) {
$msg .= "<br/>" . $lng->txt("info_delete_warning_no_trash");
}
$cgui->setHeaderText($msg);
}
$cgui->setFormAction($ilCtrl->getFormAction($this->parent_gui));
$cgui->setCancel($lng->txt("cancel"), "cancelDelete");
$cgui->setConfirm($lng->txt("confirm"), "confirmedDelete");
$form_name = "cgui_" . md5(uniqid());
$cgui->setFormName($form_name);
$deps = array();
foreach ($a_ids as $ref_id) {
$obj_id = ilObject::_lookupObjId($ref_id);
$type = ilObject::_lookupType($obj_id);
$title = call_user_func(array(ilObjectFactory::getClassByType($type), '_lookupTitle'), $obj_id);
$alt = $objDefinition->isPlugin($type) ? $lng->txt("icon") . " " . ilPlugin::lookupTxt("rep_robj", $type, "obj_" . $type) : $lng->txt("icon") . " " . $lng->txt("obj_" . $type);
$title .= $this->handleMultiReferences($obj_id, $ref_id, $form_name);
$cgui->addItem("id[]", $ref_id, $title, ilObject::_getIcon($obj_id, "small", $type), $alt);
ilObject::collectDeletionDependencies($deps, $ref_id, $obj_id, $type);
}
$deps_html = "";
if (is_array($deps) && count($deps) > 0) {
include_once "./Services/Repository/classes/class.ilRepDependenciesTableGUI.php";
$tab = new ilRepDependenciesTableGUI($deps);
$deps_html = "<br/><br/>" . $tab->getHTML();
}
$tpl->setContent($cgui->getHTML() . $deps_html);
return true;
}
示例14: fillRow
public function fillRow($row)
{
global $lng, $objDefinition;
// #11050
if (!$objDefinition->isPlugin($row["type"])) {
$txt_type = $lng->txt("obj_" . $row["type"]);
} else {
include_once "./Services/Component/classes/class.ilPlugin.php";
$txt_type = ilPlugin::lookupTxt("rep_robj", $row["type"], "obj_" . $row["type"]);
}
$this->tpl->setVariable("TITLE", $row["title"]);
$this->tpl->setVariable("ALT_ICON", $txt_type);
$this->tpl->setVariable("SRC_ICON", ilObject::_getIcon("", "tiny", $row["type"]));
$this->tpl->setVariable("PATH", $row["path"]);
if ($row["readable"]) {
$this->tpl->setCurrentBlock("actions");
$this->tpl->setVariable("ACTIONS", $this->buildActions($row["ref_id"], $row["type"]));
$this->tpl->parseCurrentBlock();
}
}
示例15: fillRow
/**
* Standard Version of Fill Row. Most likely to
* be overwritten by derived class.
*/
protected function fillRow($a_set)
{
global $lng, $ilCtrl;
$now = new ilDateTime(time(), IL_CAL_UNIX);
$this->tpl->setVariable("IMG_ALT", $lng->txt("obj_" . $a_set["type"]));
$this->tpl->setVariable("IMG_SRC", ilObject::_getIcon($a_set["obj_id"], "small", $a_set["type"]));
$this->tpl->setVariable("VAL_TITLE", $a_set["title"]);
$this->tpl->setVariable("ID", $a_set["ref_id"]);
$this->tpl->setVariable("TXT_LAST_EXPORT_FILE", $lng->txt("export_last_file"));
$this->tpl->setVariable("TXT_OMIT", $lng->txt("export_omit"));
$this->tpl->setVariable("TXT_CREATE_NEW_EXPORT_FILE", $lng->txt("export_create"));
$preset = "CREATE";
if ($a_set["timestamp"] > 0) {
$last_export = new ilDateTime($a_set["timestamp"], IL_CAL_UNIX);
$this->tpl->setVariable("VAL_LAST_EXPORT", ilDatePresentation::formatDate($last_export));
if (ilDateTime::_equals($last_export, $now, IL_CAL_DAY)) {
$preset = "LAST_FILE";
}
}
$this->tpl->setVariable("SEL_" . $preset, ' checked="checked" ');
}