当前位置: 首页>>代码示例>>PHP>>正文


PHP Monitor::getTypeName方法代码示例

本文整理汇总了PHP中Monitor::getTypeName方法的典型用法代码示例。如果您正苦于以下问题:PHP Monitor::getTypeName方法的具体用法?PHP Monitor::getTypeName怎么用?PHP Monitor::getTypeName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Monitor的用法示例。


在下文中一共展示了Monitor::getTypeName方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: sprintf

            $monitor->restore($_POST);
            Event::log($_POST["id"], "monitors", 4, "inventory", sprintf(__('%s restores an item'), $_SESSION["glpiname"]));
            $monitor->redirectToList();
        } else {
            if (isset($_POST["purge"])) {
                $monitor->check($_POST["id"], PURGE);
                $monitor->delete($_POST, 1);
                Event::log($_POST["id"], "monitors", 4, "inventory", sprintf(__('%s purges an item'), $_SESSION["glpiname"]));
                $monitor->redirectToList();
            } else {
                if (isset($_POST["update"])) {
                    $monitor->check($_POST["id"], UPDATE);
                    $monitor->update($_POST);
                    Event::log($_POST["id"], "monitors", 4, "inventory", sprintf(__('%s updates an item'), $_SESSION["glpiname"]));
                    Html::back();
                } else {
                    if (isset($_POST["unglobalize"])) {
                        $monitor->check($_POST["id"], UPDATE);
                        Computer_Item::unglobalizeItem($monitor);
                        Event::log($_POST["id"], "monitors", 4, "inventory", sprintf(__('%s sets unitary management'), $_SESSION["glpiname"]));
                        Html::redirect($CFG_GLPI["root_doc"] . "/front/monitor.form.php?id=" . $_POST["id"]);
                    } else {
                        Html::header(Monitor::getTypeName(Session::getPluralNumber()), $_SERVER['PHP_SELF'], "assets", "monitor");
                        $monitor->display(array('id' => $_GET["id"], 'withtemplate' => $_GET["withtemplate"]));
                        Html::footer();
                    }
                }
            }
        }
    }
}
开发者ID:kipman,项目名称:glpi,代码行数:31,代码来源:monitor.form.php

示例2: sprintf

            $monitor->restore($_POST);
            Event::log($_POST["id"], "monitors", 4, "inventory", sprintf(__('%s restores an item'), $_SESSION["glpiname"]));
            $monitor->redirectToList();
        } else {
            if (isset($_POST["purge"])) {
                $monitor->check($_POST["id"], 'd');
                $monitor->delete($_POST, 1);
                Event::log($_POST["id"], "monitors", 4, "inventory", sprintf(__('%s purges an item'), $_SESSION["glpiname"]));
                $monitor->redirectToList();
            } else {
                if (isset($_POST["update"])) {
                    $monitor->check($_POST["id"], 'w');
                    $monitor->update($_POST);
                    Event::log($_POST["id"], "monitors", 4, "inventory", sprintf(__('%s updates an item'), $_SESSION["glpiname"]));
                    Html::back();
                } else {
                    if (isset($_POST["unglobalize"])) {
                        $monitor->check($_POST["id"], 'w');
                        Computer_Item::unglobalizeItem($monitor);
                        Event::log($_POST["id"], "monitors", 4, "inventory", sprintf(__('%s sets unitary management'), $_SESSION["glpiname"]));
                        Html::redirect($CFG_GLPI["root_doc"] . "/front/monitor.form.php?id=" . $_POST["id"]);
                    } else {
                        Html::header(Monitor::getTypeName(2), $_SERVER['PHP_SELF'], "inventory", "monitor");
                        $monitor->showForm($_GET["id"], array('withtemplate' => $_GET["withtemplate"]));
                        Html::footer();
                    }
                }
            }
        }
    }
}
开发者ID:gaforeror,项目名称:glpi,代码行数:31,代码来源:monitor.form.php

示例3: getSearchOptions

 /**
  * Get search function for the class
  *
  * @since version 0.85
  *
  * @return array of search option
  **/
 function getSearchOptions()
 {
     $tab = parent::getSearchOptions();
     $tab[21]['table'] = $this->getTable();
     $tab[21]['field'] = 'is_visible_computer';
     $tab[21]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), Computer::getTypeName(Session::getPluralNumber()));
     $tab[21]['datatype'] = 'bool';
     $tab[22]['table'] = $this->getTable();
     $tab[22]['field'] = 'is_visible_softwareversion';
     $tab[22]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), SoftwareVersion::getTypeName(Session::getPluralNumber()));
     $tab[22]['datatype'] = 'bool';
     $tab[23]['table'] = $this->getTable();
     $tab[23]['field'] = 'is_visible_monitor';
     $tab[23]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), Monitor::getTypeName(Session::getPluralNumber()));
     $tab[23]['datatype'] = 'bool';
     $tab[24]['table'] = $this->getTable();
     $tab[24]['field'] = 'is_visible_printer';
     $tab[24]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), Printer::getTypeName(Session::getPluralNumber()));
     $tab[24]['datatype'] = 'bool';
     $tab[25]['table'] = $this->getTable();
     $tab[25]['field'] = 'is_visible_peripheral';
     $tab[25]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), Peripheral::getTypeName(Session::getPluralNumber()));
     $tab[25]['datatype'] = 'bool';
     $tab[26]['table'] = $this->getTable();
     $tab[26]['field'] = 'is_visible_phone';
     $tab[26]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), Phone::getTypeName(Session::getPluralNumber()));
     $tab[26]['datatype'] = 'bool';
     $tab[27]['table'] = $this->getTable();
     $tab[27]['field'] = 'is_visible_networkequipment';
     $tab[27]['name'] = sprintf(__('%1$s - %2$s'), __('Visibility'), NetworkEquipment::getTypeName(Session::getPluralNumber()));
     $tab[27]['datatype'] = 'bool';
     return $tab;
 }
开发者ID:kipman,项目名称:glpi,代码行数:40,代码来源:state.class.php


注:本文中的Monitor::getTypeName方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。