本文整理汇总了PHP中CommonGLPI::getType方法的典型用法代码示例。如果您正苦于以下问题:PHP CommonGLPI::getType方法的具体用法?PHP CommonGLPI::getType怎么用?PHP CommonGLPI::getType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CommonGLPI
的用法示例。
在下文中一共展示了CommonGLPI::getType方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
if (in_array($item->getType(), array('Preference', 'User'))) {
$pref = new self();
$user_id = $item->getType() == 'Preference' ? Session::getLoginUserID() : $item->getID();
$pref->showForm($user_id);
}
return true;
}
示例2: getTabNameForItem
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
if ($item->getType() == 'Computer') {
return "WinAdminPassword";
} elseif ($item->getType() == 'Printer') {
return "WinAdminPassword";
} elseif ($item->getType() == 'NetworkEquipment') {
return "WinAdminPassword";
}
return '';
}
示例3: displayTabContentForItem
/**
* Fonction native GLPI
* @param CommonGLPI $item
* @param int $tabnum
* @param int $withtemplate
* @return boolean
*/
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
if ($item->getType() == 'Computer' || $item->getType() == 'Monitor') {
if (Session::haveRightsOr('plugin_reforme_reforme', array(CREATE))) {
$reforme = new self();
$ID = $item->getField('id');
$Name = $item->getField('name');
// j'affiche le formulaire
$reforme->showForm($ID, $item->getType());
}
}
}
示例4: displayTabContentForItem
/**
* Display content of tab
*
* @param CommonGLPI $item
* @param integer $tabnum
* @param interger $withtemplate
*
* @return boolean TRUE
*/
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
if ($item->getType() == 'PluginFusioninventoryConfig') {
$pfAgentmodule = new self();
$pfAgentmodule->showForm();
} else {
if ($item->getType() == 'PluginFusioninventoryAgent') {
$pfAgentmodule = new self();
$pfAgentmodule->showFormAgentException($item->getID());
}
}
return TRUE;
}
示例5: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
global $CFG_GLPI;
if ($item->getType() == 'User') {
$ID = $item->getField('id');
} else {
if ($item->getType() == 'Preference') {
$ID = Session::getLoginUserID();
}
}
$self = new self();
$self->showForm($ID);
return true;
}
示例6: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
global $CFG_GLPI;
if ($item->getType() == 'NotificationMailSetting') {
$target = $CFG_GLPI["root_doc"] . "/plugins/additionalalerts/front/config.form.php";
self::showFormAlerts($target);
} else {
if ($item->getType() == 'Entity') {
PluginAdditionalalertsInfocomAlert::showNotificationOptions($item);
PluginAdditionalalertsOcsAlert::showNotificationOptions($item);
}
}
return true;
}
示例7: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
if ($item->getType() == 'Config') {
$config = new self();
$config->showFormExample();
}
}
示例8: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
if ($item->getType() == __CLASS__) {
switch ($tabnum) {
case 1:
// all
Planning::showSelectionForm($_POST['type'], $_POST['date'], 'my', 0, $_POST["limititemtype"]);
Planning::showPlanning($_SESSION['glpiID'], $_POST["gID"], $_POST["date"], $_POST["type"], $_POST["limititemtype"]);
break;
case 2:
Planning::showSelectionForm($_POST['type'], $_POST['date'], 'mygroups', 0, $_POST["limititemtype"]);
Planning::showPlanning($_SESSION['glpiID'], 'mine', $_POST["date"], $_POST["type"], $_POST["limititemtype"]);
break;
case 3:
Planning::showSelectionForm($_POST['type'], $_POST['date'], 'users', $_POST["uID"], $_POST["limititemtype"]);
Planning::showPlanning($_POST['uID'], 0, $_POST["date"], $_POST["type"], $_POST["limititemtype"]);
break;
case 4:
Planning::showSelectionForm($_POST['type'], $_POST['date'], 'groups', $_POST["gID"], $_POST["limititemtype"]);
Planning::showPlanning(0, $_POST['gID'], $_POST["date"], $_POST["type"], $_POST["limititemtype"]);
break;
}
}
return true;
}
示例9: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
global $DB;
if ($item->getType() == 'PluginFusioninventoryTask') {
$item->showJobLogs();
}
}
示例10: getTabNameForItem
function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
{
if ($item->getType() == 'Profile') {
return "WinAdminPassword";
}
return '';
}
示例11: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
$pflock = new self();
if ($item->getType() == 'PluginFusioninventoryConfig') {
echo "<table width='950'>";
echo "<tr>";
echo "<td valign='top' width='33%'>";
$pflock->showFormItemtype('Computer');
echo "</td>";
echo "<td valign='top' width='33%'>";
$pflock->showFormItemtype('Printer');
echo "</td>";
echo "<td valign='top' width='33%'>";
$pflock->showFormItemtype('NetworkEquipment');
echo "</td>";
echo "</tr>";
echo "</table>";
return TRUE;
}
if ($item->getID() < 1) {
$pflock->showForm(Toolbox::getItemTypeFormURL('PluginFusioninventoryLock'), $item->getType());
} else {
$pflock->showForm(Toolbox::getItemTypeFormURL('PluginFusioninventoryLock') . '?id=' . $item->getID(), $item->getType(), $item->getID());
}
return TRUE;
}
示例12: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
$pfRulematchedlog = new self();
if ($tabnum == '0') {
if ($item->getID() > 0) {
$pfRulematchedlog->showFormAgent($item->getID());
}
} else {
if ($tabnum == '1') {
if ($item->getID() > 0) {
$pfRulematchedlog->showForm($item->getID(), $item->getType());
$itemtype = '';
switch (get_class($item)) {
case 'Computer':
$itemtype = new PluginFusioninventoryInventoryComputerComputer();
break;
case 'Printer':
$itemtype = new PluginFusioninventoryPrinter();
break;
case 'NetworkEquipment':
$itemtype = new PluginFusioninventoryNetworkEquipment();
break;
}
if (is_object($itemtype) && $itemtype->canView()) {
$itemtype->displaySerializedInventory($item->getID());
}
}
}
}
return TRUE;
}
示例13: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
if ($item->getType() == __CLASS__) {
$item->showMergeCandidates();
}
return true;
}
示例14: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum=1, $withtemplate=0) {
if ($item->getType()=='Computer') {
if (self::canView()) {
// Show list filtered on item, sorted on component ascending ...
Search::manageGetValues(PluginMonitoringUnavailability::getTypeName());
Search::showList(PluginMonitoringUnavailability::getTypeName(), array(
'field' => array(22), 'searchtype' => array('equals'), 'contains' => array($item->getID()),
'sort' => 3, 'order' => 'DESC'
));
return true;
}
} else if ($item->getType()=='NetworkEquipment') {
if (self::canView()) {
// Show list filtered on item, sorted on component ascending ...
Search::manageGetValues(PluginMonitoringUnavailability::getTypeName());
Search::showList(PluginMonitoringUnavailability::getTypeName(), array(
'field' => array(23), 'searchtype' => array('equals'), 'contains' => array($item->getID()),
'sort' => 3, 'order' => 'DESC'
));
return true;
}
}
return true;
}
示例15: displayTabContentForItem
static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
{
if ($item->getType() == __CLASS__) {
self::showDoubles($item);
}
return true;
}