本文整理汇总了PHP中Dropdown::getdropdownname方法的典型用法代码示例。如果您正苦于以下问题:PHP Dropdown::getdropdownname方法的具体用法?PHP Dropdown::getdropdownname怎么用?PHP Dropdown::getdropdownname使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Dropdown
的用法示例。
在下文中一共展示了Dropdown::getdropdownname方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: plugin_projet_giveItem
//.........这里部分代码省略.........
}
return "";
break;
case 'PluginProjetTask':
switch ($table . '.' . $field) {
case "glpi_plugin_projet_tasks_tasks.plugin_projet_tasks_id_1":
$out = " ";
$split = explode("\$\$\$\$", $data["ITEM_" . $num]);
$split2 = explode("\$\$\$\$", $data["ITEM_" . $num . "_2"]);
$displayed = array();
for ($k = 0; $k < count($split); $k++) {
//$linkid = $split2[$k];
$linkid = $split[$k] == $data['id'] ? $split2[$k] : $split2[$k];
if ($linkid > 0 && $linkid != $data['id'] && !isset($displayed[$linkid])) {
$text = $linkid . " - " . Dropdown::getDropdownName('glpi_plugin_projet_tasks', $linkid);
if (count($displayed)) {
$out .= "<br>";
}
$displayed[$linkid] = $linkid;
$out .= $text;
}
}
return $out;
break;
case "glpi_plugin_projet_tasks.advance":
$out = PluginProjetProjet::displayProgressBar('100', $data["ITEM_{$num}"]);
return $out;
break;
case "glpi_plugin_projet_tasks.priority":
$out = Ticket::getPriorityName($data["ITEM_{$num}"]);
return $out;
break;
case 'glpi_plugin_projet_tasks.depends':
$out = "";
if ($data["ITEM_{$num}"] == 1) {
$out .= "<span class='red'>";
}
$out .= Dropdown::getYesNo($data["ITEM_{$num}"]);
if ($data["ITEM_{$num}"] == 1) {
$out .= "</span>";
}
return $out;
break;
case "glpi_plugin_projet_tasks.plugin_projet_projets_id":
$out = Dropdown::getdropdownname("glpi_plugin_projet_projets", $data["ITEM_{$num}"]);
$out .= " (" . $data["ITEM_{$num}"] . ")";
return $out;
break;
case "glpi_plugin_projet_tasks_items.items_id":
$restrict = "`plugin_projet_tasks_id` = '" . $data['id'] . "' \n ORDER BY `itemtype`, `items_id`";
$items = getAllDatasFromTable("glpi_plugin_projet_tasks_items", $restrict);
$out = '';
if (!empty($items)) {
foreach ($items as $device) {
$item = new $device["itemtype"]();
$item->getFromDB($device["items_id"]);
$out .= $item->getTypeName() . " - " . $item->getLink() . "<br>";
}
}
return $out;
break;
case "glpi_contacts.name":
if (!empty($data["ITEM_{$num}"])) {
$link = Toolbox::getItemTypeFormURL('Contact');
$out = "<a href=\"" . $link . "?id=" . $data["ITEM_{$num}"] . "\">";
$temp = $data["contacts_name"];
$firstname = $data["contacts_firstname"];
if (strlen($firstname) > 0) {
if ($CFG_GLPI["names_format"] == FIRSTNAME_BEFORE) {
$temp = $firstname . " " . $temp;
} else {
$temp .= " " . $firstname;
}
}
$out .= $temp;
if ($_SESSION["glpiis_ids_visible"] || empty($data["ITEM_{$num}"])) {
$out .= " (" . $data["ITEM_{$num}"] . ")";
}
$out .= "</a>";
} else {
$out = "";
}
return $out;
break;
case "glpi_plugin_projet_taskplannings.id":
if (!empty($data["ITEM_{$num}"])) {
$plan = new PluginProjetTaskPlanning();
$plan->getFromDB($data["ITEM_{$num}"]);
$out = Html::convDateTime($plan->fields["begin"]) . "<br> -> " . Html::convDateTime($plan->fields["end"]);
} else {
$out = __('None');
}
return $out;
break;
}
return "";
break;
}
return "";
}