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


PHP CommonGLPI::getType方法代码示例

本文整理汇总了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;
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:9,代码来源:user.class.php

示例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 '';
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:11,代码来源:winadminpassword.class.php

示例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());
         }
     }
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:19,代码来源:reforme.class.php

示例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;
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:22,代码来源:agentmodule.class.php

示例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;
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:14,代码来源:userpref.class.php

示例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;
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:14,代码来源:config.class.php

示例7: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == 'Config') {
         $config = new self();
         $config->showFormExample();
     }
 }
开发者ID:pluginsGLPI,项目名称:example,代码行数:7,代码来源:config.class.php

示例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;
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:25,代码来源:planning.class.php

示例9: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     global $DB;
     if ($item->getType() == 'PluginFusioninventoryTask') {
         $item->showJobLogs();
     }
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:7,代码来源:taskjobstate.class.php

示例10: getTabNameForItem

 function getTabNameForItem(CommonGLPI $item, $withtemplate = 0)
 {
     if ($item->getType() == 'Profile') {
         return "WinAdminPassword";
     }
     return '';
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:7,代码来源:profile.class.php

示例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;
 }
开发者ID:korial29,项目名称:fusioninventory-for-glpi,代码行数:26,代码来源:lock.class.php

示例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;
 }
开发者ID:korial29,项目名称:fusioninventory-for-glpi,代码行数:31,代码来源:rulematchedlog.class.php

示例13: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == __CLASS__) {
         $item->showMergeCandidates();
     }
     return true;
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:7,代码来源:software.class.php

示例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;
   }
开发者ID:euqip,项目名称:glpi-smartcities,代码行数:26,代码来源:unavailability.class.php

示例15: displayTabContentForItem

 static function displayTabContentForItem(CommonGLPI $item, $tabnum = 1, $withtemplate = 0)
 {
     if ($item->getType() == __CLASS__) {
         self::showDoubles($item);
     }
     return true;
 }
开发者ID:geldarr,项目名称:hack-space,代码行数:7,代码来源:fieldunicity.class.php


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