本文整理汇总了PHP中ilUtil::getImagePath方法的典型用法代码示例。如果您正苦于以下问题:PHP ilUtil::getImagePath方法的具体用法?PHP ilUtil::getImagePath怎么用?PHP ilUtil::getImagePath使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilUtil
的用法示例。
在下文中一共展示了ilUtil::getImagePath方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setTabs
/**
* output tabs
*/
function setTabs()
{
global $ilTabs, $ilCtrl, $tpl, $lng;
// subelements
$ilTabs->addTarget("sahs_organization", $ilCtrl->getLinkTarget($this, 'showOrganization'), "showOrganization", get_class($this));
// questions
$ilTabs->addTarget("sahs_questions", $ilCtrl->getLinkTarget($this, 'sahs_questions'), "sahs_questions", get_class($this));
// resources
$ilTabs->addTarget("cont_files", $ilCtrl->getLinkTarget($this, 'sco_resources'), "sco_resources", get_class($this));
// metadata
$ilTabs->addTarget("meta_data", $ilCtrl->getLinkTargetByClass("ilmdeditorgui", ''), "", "ilmdeditorgui");
// export
/*
$ilTabs->addTarget("export",
$ilCtrl->getLinkTarget($this, "showExportList"), "showExportList",
get_class($this));
// import
$ilTabs->addTarget("import",
$ilCtrl->getLinkTarget($this, "import"), "import",
get_class($this));
*/
// preview
$ilTabs->addNonTabbedLink("preview", $lng->txt("cont_preview"), $ilCtrl->getLinkTarget($this, 'sco_preview'), "_blank");
$tpl->setTitleIcon(ilUtil::getImagePath("icon_ass.svg"));
$tpl->setTitle($lng->txt("obj_ass") . ": " . $this->node_object->getTitle());
}
示例2: fillRow
/**
* Fills an entire table row with the given set.
*
* (non-PHPdoc)
*
* @see ilTable2GUI::fillRow()
*
* @param $a_set data set for that row
*/
public function fillRow($a_set)
{
if ($a_set['recurrence']) {
// icon for the recurrence date
$this->tpl->setVariable('IMG_RECURRENCE_PATH', ilUtil::getImagePath("cmd_move_s.png"));
$this->tpl->setVariable('IMG_RECURRENCE_TITLE', $this->lng->txt("rep_robj_xrs_room_date_recurrence"));
} else {
//fills the column
$this->tpl->setVariable('TXT_BLANK', '');
}
// ### Appointment ###
$this->tpl->setVariable('TXT_DATE', $a_set['date']);
// ### Room ###
$this->tpl->setVariable('TXT_ROOM', $a_set['room']);
// ### Subject ###
$this->tpl->setVariable('TXT_SUBJECT', $a_set['subject'] === NULL ? '' : $a_set['subject']);
// ### Participants ###
$participant_count = count($a_set['participants']);
for ($i = 0; $i < $participant_count; ++$i) {
$this->tpl->setCurrentBlock("participants");
$this->tpl->setVariable("TXT_USER", $a_set['participants'][$i]);
if ($i < $participant_count - 1) {
$this->tpl->setVariable('TXT_SEPARATOR', ',');
}
$this->tpl->parseCurrentBlock();
}
// Populate the selected additional table cells
foreach ($this->getSelectedColumns() as $c) {
$this->tpl->setCurrentBlock("additional");
$this->tpl->setVariable("TXT_ADDITIONAL", $a_set[$c] === NULL ? "" : $a_set[$c]);
$this->tpl->parseCurrentBlock();
}
}
示例3: getTypeIconPath
/**
* Get type icon path path
* Return image path for icon_xxx.pngs
* Or (if enabled) path to custom icon
*
* @access public
* @param string obj_type
* @param int obj_id
* @param string size 'tiny','small' or 'big'
* @static
*
*/
public static function getTypeIconPath($a_type, $a_obj_id, $a_size = 'small')
{
global $ilSetting;
if ($ilSetting->get("custom_icons")) {
switch ($a_type) {
case 'cat':
case 'crs':
case 'grp':
include_once './Services/Container/classes/class.ilContainer.php';
if (strlen($path = ilContainer::_lookupIconPath($a_obj_id, $a_size))) {
return $path;
}
}
}
switch ($a_size) {
case 'tiny':
$postfix = '_s.png';
break;
case 'big':
$postfix = '_b.png';
break;
default:
$postfix = '.png';
break;
}
return ilUtil::getImagePath('icon_' . $a_type . $postfix);
}
示例4: getAudioScript
/**
* @return string
*/
public static function getAudioScript()
{
$script = self::getDirectory() . '/securimage_play.swf';
$script = ilUtil::appendUrlParameterString($script, 'audio_file=' . self::getDirectory() . '/il_securimage_play.php', true);
$script = ilUtil::appendUrlParameterString($script, 'icon_file=' . ilUtil::getImagePath('icon_audiocaptcha-19.png'), true);
return $script;
}
示例5: 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;
}
}
}
示例6: 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"]);
}
示例7: setTabs
function setTabs()
{
global $tpl, $lng;
parent::setTabs();
$tpl->setTitleIcon(ilUtil::getImagePath("icon_seqc_b.png"));
$tpl->setTitle($lng->txt("sahs_chapter") . ": " . $this->node_object->getTitle());
}
示例8: getNodeIcon
/**
* Get node icon
*
* @param array $a_node node array
* @return string icon path
*/
function getNodeIcon($a_node)
{
if ($a_node["child"] == $this->getNodeId($this->getRootNode())) {
$icon = ilUtil::getImagePath("icon_lm.svg");
} else {
$a_name = "icon_" . $a_node["type"] . ".svg";
if ($a_node["type"] == "pg") {
include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
$lm_set = new ilSetting("lm");
$active = ilLMPage::_lookupActive($a_node["child"], $this->lm->getType(), $lm_set->get("time_scheduled_page_activation"));
// is page scheduled?
$img_sc = $lm_set->get("time_scheduled_page_activation") && ilLMPage::_isScheduledActivation($a_node["child"], $this->lm->getType()) ? "_sc" : "";
$a_name = "icon_pg" . $img_sc . ".svg";
if (!$active) {
$a_name = "icon_pg_d" . $img_sc . ".svg";
} else {
include_once "./Modules/LearningModule/classes/class.ilLMPage.php";
$contains_dis = ilLMPage::_lookupContainsDeactivatedElements($a_node["child"], $this->lm->getType());
if ($contains_dis) {
$a_name = "icon_pg_del" . $img_sc . ".svg";
}
}
}
$icon = ilUtil::getImagePath($a_name);
}
return $icon;
}
示例9: getTypeIconPath
/**
* Get type icon path path
* Return image path for icon_xxx.pngs
* Or (if enabled) path to custom icon
*
* @access public
* @param string obj_type
* @param int obj_id
* @param string size 'tiny','small' or 'big'
* @static
*
*/
public static function getTypeIconPath($a_type, $a_obj_id, $a_size = 'small')
{
global $ilSetting, $objDefinition;
if ($ilSetting->get("custom_icons")) {
switch ($a_type) {
case 'cat':
case 'crs':
case 'grp':
include_once './Services/Container/classes/class.ilContainer.php';
if (strlen($path = ilContainer::_lookupIconPath($a_obj_id, $a_size))) {
return $path;
}
}
}
if ($objDefinition->isPluginTypeName($a_type)) {
$class_name = "il" . $objDefinition->getClassName($a_type) . 'Plugin';
$location = $objDefinition->getLocation($a_type);
include_once $location . "/class." . $class_name . ".php";
return call_user_func(array($class_name, "_getIcon"), $a_type, $a_size, $a_obj_id);
}
switch ($a_size) {
case 'tiny':
$postfix = '_s.png';
break;
case 'big':
$postfix = '_b.png';
break;
default:
$postfix = '.png';
break;
}
return ilUtil::getImagePath('icon_' . $a_type . $postfix);
}
示例10: setImage
/**
* Set image
*
* @param string $a_value
* @param bool $a_is_internal
*/
public function setImage($a_value, $a_is_internal = true)
{
if ((bool) $a_is_internal) {
$a_value = ilUtil::getImagePath($a_value);
}
$this->src = trim($a_value);
}
示例11: 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_marker) {
if ($data['marked']) {
$this->tpl->setCurrentBlock('marked_img');
$this->tpl->setVariable("ALT_MARKED", $this->lng->txt("tst_question_marked"));
$this->tpl->setVariable("HREF_MARKED", ilUtil::getImagePath("marked.png"));
$this->tpl->parseCurrentBlock();
} else {
$this->tpl->touchBlock('marker');
}
}
// 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']);
$this->tpl->setVariable("POSTPONED", $data['postponed']);
}
示例12: fillRow
/**
* Fill a single data row.
*/
protected function fillRow($a_set)
{
global $lng, $ilCtrl;
if ($a_set["img"] == ilObjectPermissionStatusGUI::IMG_OK) {
$img_path = ilUtil::getImagePath("icon_ok.svg");
$img_info = $lng->txt("info_assigned");
} else {
$img_path = ilUtil::getImagePath("icon_not_ok.svg");
$img_info = $lng->txt("info_not_assigned");
}
$this->tpl->setVariable("IMG_PATH", $img_path);
$this->tpl->setVariable("IMG_INFO", $img_info);
$link = $ilCtrl->getLinkTargetByClass(array(ilpermissiongui), 'perm', '', true);
$this->tpl->setVariable("ROLE_LINK", $link);
$this->tpl->setVariable("TXT_ROLE", $a_set["role"]);
if ($a_set["effective_from"] != "") {
$this->tpl->setCurrentBlock("effective_from");
$this->tpl->setVariable("EFFECTIVE_FROM_LINK", ilLink::_getLink($a_set["effective_from_ref_id"]));
$this->tpl->setVariable("TXT_EFFECTIVE_FROM", $a_set["effective_from"]);
$this->tpl->parseCurrentBlock();
}
if ($a_set["original_position_ref_id"] !== false) {
$this->tpl->setCurrentBlock("original_position_with_link");
$this->tpl->setVariable("TXT_ORIGINAL_POSITION_WITH_LINK", $a_set["original_position"]);
$this->tpl->setVariable("ORIGINAL_POSITION_LINK", ilLink::_getLink($a_set["original_position_ref_id"]));
$this->tpl->parseCurrentBlock();
} else {
$this->tpl->setVariable("TXT_ORIGINAL_POSITION", $a_set["original_position"]);
}
}
示例13: 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);
}
示例14: executeCommand
public function executeCommand()
{
global $ilCtrl, $lng, $tpl, $ilTabs;
$next_class = $ilCtrl->getNextClass($this);
$cmd = $ilCtrl->getCmd("show");
$tpl->setTitle($lng->txt("portfolio"));
$tpl->setTitleIcon(ilUtil::getImagePath("icon_prtf.svg"), $lng->txt("portfolio"));
switch ($next_class) {
case "ilobjportfoliogui":
if ($cmd != "preview") {
$this->setLocator();
$ilTabs->setBack2Target($lng->txt("prtf_tab_portfolios"), $ilCtrl->getLinkTarget($this, "show"));
}
include_once './Modules/Portfolio/classes/class.ilObjPortfolioGUI.php';
$gui = new ilObjPortfolioGUI($_REQUEST["prt_id"]);
$ilCtrl->forwardCommand($gui);
break;
default:
$this->setLocator();
$this->setTabs();
$this->{$cmd}();
break;
}
return true;
}
示例15: fillRow
/**
* Fill row template
* @param array $a_row
*/
public function fillRow($a_row)
{
global $ilCtrl;
$this->tpl->setVariable('OBJ_SRC', $a_row['icon']);
$this->tpl->setVariable('OBJ_ALT', $a_row['icon_alt']);
$this->tpl->setVariable('OBJ_TITLE', $a_row['title']);
include_once './Services/Link/classes/class.ilLink.php';
$this->tpl->setVariable('OBJ_LINK', ilLink::_getLink($a_row['ref_id'], $a_row['type']));
$this->tpl->setVariable('OBJ_DESCRIPTION', $a_row['description']);
$this->tpl->setVariable('COND_ID', $a_row['id']);
$this->tpl->setVariable('OBJ_CONDITION', $a_row['condition']);
if (!$this->enable_editing) {
$this->tpl->setCurrentBlock("obligatory_static");
$this->tpl->setVariable('OBL_SRC', ilUtil::getImagePath($a_row['obligatory'] ? 'icon_ok.svg' : 'icon_not_ok.svg'));
$this->tpl->setVariable('OBL_ALT', $this->lng->txt($a_row['obligatory'] ? 'precondition_obligatory_alt' : 'precondition_not_obligatory_alt'));
$this->tpl->parseCurrentBlock();
} else {
$this->tpl->setCurrentBlock("obligatory_edit");
$this->tpl->setVariable('OBL_ID', $a_row['id']);
$this->tpl->setVariable('OBL_STATUS', $a_row['obligatory'] ? ' checked="checked"' : '');
$this->tpl->parseCurrentBlock();
}
$ilCtrl->setParameterByClass(get_class($this->getParentObject()), 'condition_id', $a_row['id']);
$this->tpl->setVariable('EDIT_LINK', $ilCtrl->getLinkTargetByClass(get_class($this->getParentObject()), 'edit'));
$this->tpl->setVariable('TXT_EDIT', $this->lng->txt('edit'));
}