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


PHP Toolbox::getItemTypeFormUrl方法代码示例

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


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

示例1: getMenuContent

 static function getMenuContent()
 {
     global $CFG_GLPI;
     $menu = array();
     $menu['title'] = self::getMenuName();
     $menu['page'] = '/plugins/datainjection/front/clientinjection.form.php';
     if (Session::haveRight(static::$rightname, READ)) {
         $image_model = "<img src='" . $CFG_GLPI["root_doc"] . "/pics/rdv.png' title='";
         $image_model .= PluginDatainjectionModel::getTypeName();
         $image_model .= "' alt='" . PluginDatainjectionModel::getTypeName() . "'>";
         $image_import = "<img src='" . $CFG_GLPI["root_doc"] . "/pics/actualiser.png' title='";
         $image_import .= __s('Injection of the file', 'datainjection');
         $image_import .= "' alt='" . __s('Injection of the file', 'datainjection') . "'>";
         $menu['options']['client']['title'] = self::getMenuName();
         $menu['options']['client']['page'] = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
         $menu['options']['client']['links']['search'] = '/plugins/datainjection/front/clientinjection.form.php';
         if (Session::haveRight('plugin_datainjection_model', READ)) {
             $menu['options']['model']['title'] = PluginDatainjectionModel::getTypeName();
             $menu['options']['model']['page'] = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
             $menu['options']['model']['links']['search'] = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
             $menu['options']['client']['links'][$image_model] = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
         }
         //$menu['options']['client']['links'][$image_model]  = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
         $menu['options']['model']['links'][$image_import] = '/plugins/datainjection/front/clientinjection.form.php';
         if (Session::haveRight('plugin_datainjection_model', UPDATE) || Session::haveRight('plugin_datainjection_model', CREATE)) {
             $menu['options']['model']['links']['add'] = Toolbox::getItemTypeFormUrl('PluginDatainjectionModel', false);
             $menu['options']['client']['links'][$image_model] = Toolbox::getItemTypeSearchUrl('PluginDatainjectionModel', false);
         }
     }
     return $menu;
 }
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:31,代码来源:menu.class.php

示例2: getMenuContent

 static function getMenuContent()
 {
     global $CFG_GLPI;
     $menu = array();
     $menu['title'] = self::getMenuName();
     $menu['page'] = '/plugins/itilcategorygroups/front/category.php';
     if (Session::haveRight('config', READ)) {
         $menu['options']['model']['title'] = PluginItilcategorygroupsMenu::getTypeName();
         $menu['options']['model']['page'] = Toolbox::getItemTypeSearchUrl('PluginItilcategorygroupsCategory', false);
         $menu['options']['model']['links']['search'] = Toolbox::getItemTypeSearchUrl('PluginItilcategorygroupsCategory', false);
         if (Session::haveRight('config', UPDATE)) {
             $menu['options']['model']['links']['add'] = Toolbox::getItemTypeFormUrl('PluginItilcategorygroupsCategory', false);
         }
     }
     return $menu;
 }
开发者ID:pluginsGLPI,项目名称:itilcategorygroups,代码行数:16,代码来源:menu.class.php

示例3: getMenuContent

 static function getMenuContent()
 {
     global $CFG_GLPI;
     $menu = array();
     // get Menu name :
     $tab = plugin_version_uninstall();
     $menu['title'] = $tab["name"];
     $menu['page'] = '/plugins/uninstall/front/model.php';
     if (Session::haveRight(PluginUninstallProfile::$rightname, READ)) {
         $menu['options']['model']['title'] = self::getTypeName(1);
         $menu['options']['model']['page'] = Toolbox::getItemTypeSearchUrl('PluginUninstallModel', false);
         $menu['options']['model']['links']['search'] = Toolbox::getItemTypeSearchUrl('PluginUninstallModel', false);
         if (Session::haveRight(PluginUninstallProfile::$rightname, UPDATE)) {
             $menu['options']['model']['links']['add'] = Toolbox::getItemTypeFormUrl('PluginUninstallModel', false);
         }
     }
     return $menu;
 }
开发者ID:pluginsGLPI,项目名称:uninstall,代码行数:18,代码来源:model.class.php

示例4: showOrderLink

 public function showOrderLink($plugin_order_orders_id)
 {
     global $DB, $CFG_GLPI;
     $PluginOrderOrder = new PluginOrderOrder();
     $PluginOrderOrder_Item = new PluginOrderOrder_Item();
     $PluginOrderReference = new PluginOrderReference();
     $PluginOrderReception = new PluginOrderReception();
     $PluginOrderOrder->getFromDB($plugin_order_orders_id);
     $canedit = $PluginOrderOrder->canDeliver() && !$PluginOrderOrder->canUpdateOrder() && !$PluginOrderOrder->isCanceled();
     $query_ref = "SELECT `glpi_plugin_order_orders_items`.`id` AS IDD,\n                           `glpi_plugin_order_orders_items`.`plugin_order_references_id` AS id,\n                           `glpi_plugin_order_references`.`name`,\n                           `glpi_plugin_order_references`.`itemtype`,\n                           `glpi_plugin_order_references`.`manufacturers_id`,\n                           `glpi_plugin_order_orders_items`.`price_taxfree`,\n                           `glpi_plugin_order_orders_items`.`discount`\n                    FROM `glpi_plugin_order_orders_items`, `glpi_plugin_order_references`\n                    WHERE `plugin_order_orders_id` = '{$plugin_order_orders_id}'\n                    AND `glpi_plugin_order_orders_items`.`plugin_order_references_id` = `glpi_plugin_order_references`.`id`\n                    AND `glpi_plugin_order_orders_items`.`states_id` = '" . PluginOrderOrder::ORDER_DEVICE_DELIVRED . "'\n                    GROUP BY `glpi_plugin_order_orders_items`.`plugin_order_references_id`\n                    ORDER BY `glpi_plugin_order_references`.`name`";
     $result_ref = $DB->query($query_ref);
     $numref = $DB->numrows($result_ref);
     while ($data_ref = $DB->fetch_array($result_ref)) {
         echo "<div class='center'><table class='tab_cadre_fixe'>";
         if (!$numref) {
             echo "<tr><th>" . __("No item to take delivery of", "order") . "</th></tr></table></div>";
         } else {
             $plugin_order_references_id = $data_ref["id"];
             $itemtype = $data_ref["itemtype"];
             $canuse = $itemtype != 'PluginOrderOther';
             $item = new $itemtype();
             $rand = mt_rand();
             $query = "SELECT  `glpi_plugin_order_orders_items`.`id` AS IDD,\n                              `glpi_plugin_order_references`.`id` AS id,\n                              `glpi_plugin_order_references`.`templates_id`,\n                              `glpi_plugin_order_orders_items`.`states_id`,\n                              `glpi_plugin_order_orders_items`.`delivery_date`,\n                              `glpi_plugin_order_orders_items`.`delivery_number`,\n                              `glpi_plugin_order_references`.`name`,\n                              `glpi_plugin_order_references`.`itemtype`,\n                              `glpi_plugin_order_orders_items`.`items_id`,\n                              `glpi_plugin_order_orders_items`.`price_taxfree`,\n                              `glpi_plugin_order_orders_items`.`discount`\n                       FROM `glpi_plugin_order_orders_items`, `glpi_plugin_order_references`\n                       WHERE `plugin_order_orders_id` = '{$plugin_order_orders_id}'\n                       AND `glpi_plugin_order_orders_items`.`plugin_order_references_id` = '{$plugin_order_references_id}'\n                       AND `glpi_plugin_order_orders_items`.`plugin_order_references_id` = `glpi_plugin_order_references`.`id`\n                       AND `glpi_plugin_order_orders_items`.`states_id` = '" . PluginOrderOrder::ORDER_DEVICE_DELIVRED . "'";
             if ($itemtype == 'SoftwareLicense') {
                 $query .= " GROUP BY `glpi_plugin_order_orders_items`.`price_taxfree`,\n                                    `glpi_plugin_order_orders_items`.`discount`";
             }
             $query .= " ORDER BY `glpi_plugin_order_references`.`name`";
             $result = $DB->query($query);
             $num = $DB->numrows($result);
             echo "<tr><th><ul><li>";
             echo "<a href=\"javascript:showHideDiv('generation{$rand}','generation_img{$rand}', " . "'" . $CFG_GLPI['root_doc'] . "/pics/plus.png','" . $CFG_GLPI['root_doc'] . "/pics/moins.png');\">";
             echo "<img alt='' name='generation_img{$rand}' src=\"" . $CFG_GLPI['root_doc'] . "/pics/plus.png\">";
             echo "</a>";
             echo "</li></ul></th>";
             echo "<th>" . __("Type") . "</th>";
             echo "<th>" . __("Manufacturer") . "</th>";
             echo "<th>" . __("Product reference", "order") . "</th>";
             echo "</tr>";
             echo "<tr class='tab_bg_1 center'>";
             echo "<td></td>";
             echo "<td align='center'>" . $item->getTypeName() . "</td>";
             echo "<td align='center'>" . Dropdown::getDropdownName("glpi_manufacturers", $data_ref["manufacturers_id"]) . "</td>";
             echo "<td>" . $PluginOrderReference->getReceptionReferenceLink($data_ref) . "&nbsp;({$num})</td>";
             echo "</tr>";
             echo "</table>";
             echo "<div class='center' id='generation{$rand}' style='display:none'>";
             echo "<form method='post' name='order_generation_form{$rand}'\n                     id='order_generation_form{$rand}'  action=\"" . Toolbox::getItemTypeFormUrl(__CLASS__) . "\">";
             echo "<table class='tab_cadre_fixe'>";
             echo "<tr>";
             if ($canedit & $canuse) {
                 echo "<th width='15'></th>";
             }
             if ($itemtype != 'SoftwareLicense') {
                 echo "<th>" . __("ID") . "</th>";
             } else {
                 echo "<th>" . __("Quantity", "order") . "</th>";
             }
             echo "<th>" . __("Reference") . "</th>";
             echo "<th>" . __("Status") . "</th>";
             echo "<th>" . __("Delivery date") . "</th>";
             echo "<th>" . _n("Associated item", "Associated items", 2) . "</th></tr>";
             while ($data = $DB->fetch_array($result)) {
                 $random = mt_rand();
                 $detailID = $data["IDD"];
                 echo "<tr class='tab_bg_2'>";
                 if ($canedit & $canuse) {
                     echo "<td width='15' align='left'>";
                     $sel = "";
                     if (isset($_GET["select"]) && $_GET["select"] == "all") {
                         $sel = "checked";
                     }
                     echo "<input type='checkbox' name='item[" . $detailID . "]' value='1' {$sel}>";
                     echo "</td>";
                 }
                 if ($itemtype != 'SoftwareLicense') {
                     echo "<td align='center'>" . $data["IDD"] . "</td>";
                 } else {
                     echo "<td align='center'>";
                     echo $PluginOrderOrder_Item->getTotalQuantityByRefAndDiscount($plugin_order_orders_id, $plugin_order_references_id, $data["price_taxfree"], $data["discount"]);
                     echo "</td>";
                 }
                 echo "<td align='center'>" . $PluginOrderReference->getReceptionReferenceLink($data) . "</td>";
                 echo "<td align='center'>" . $PluginOrderReception->getReceptionStatus($detailID) . "</td>";
                 echo "<td align='center'>" . Html::convDate($data["delivery_date"]) . "</td>";
                 echo "<td align='center'>" . $this->getReceptionItemName($data["items_id"], $data["itemtype"]);
                 echo "<input type='hidden' name='id[{$detailID}]' value='{$detailID}'>";
                 echo "<input type='hidden' name='name[{$detailID}]' value='" . $data["name"] . "'>";
                 echo "<input type='hidden' name='itemtype[{$detailID}]' value='" . $data["itemtype"] . "'>";
                 echo "<input type='hidden' name='templates_id[{$detailID}]' value='" . $data["templates_id"] . "'>";
                 echo "<input type='hidden' name='states_id[{$detailID}]' value='" . $data["states_id"] . "'>";
             }
             echo "</tr>";
             echo "</table>";
             if ($canedit & $canuse) {
                 Html::openArrowMassives("order_generation_form{$rand}", true);
                 echo "<input type='hidden' name='plugin_order_orders_id' value='{$plugin_order_orders_id}'>";
                 $entities_id = $PluginOrderOrder->fields['entities_id'];
                 $this->dropdownLinkActions($itemtype, $plugin_order_references_id, $plugin_order_orders_id, $entities_id);
                 Html::closeArrowMassives(array());
             }
//.........这里部分代码省略.........
开发者ID:pluginsGLPI,项目名称:order,代码行数:101,代码来源:link.class.php

示例5: showForConfig

 static function showForConfig($id)
 {
     global $CFG_GLPI, $DB;
     $config = new PluginGeninventorynumberConfig();
     $config->getFromDB($id);
     $target = Toolbox::getItemTypeFormUrl(__CLASS__);
     echo "<form name='form_core_config' method='post' action=\"{$target}\">";
     echo "<div align='center'>";
     echo "<table class='tab_cadre_fixe'>";
     echo "<tr><th colspan='5'>" . __('PerDeviceTypeConfiguration', 'geninventorynumber') . "</th></tr>";
     echo "<input type='hidden' name='id' value='{$id}'>";
     echo "<input type='hidden' name='entities_id' value='0'>";
     echo "<tr><th colspan='2'>" . __('GenerationModel', 'geninventorynumber');
     echo "</th><th>" . __('Active') . "</th>";
     echo "<th>" . __('UseGlobalIndex', 'geninventorynumber') . "</th>";
     echo "<th colspan='2'>" . __('IndexPosition', 'geninventorynumber') . "</th></tr>";
     foreach (getAllDatasFromTable(getTableForItemType(__CLASS__)) as $value) {
         $itemtype = $value['itemtype'];
         echo "<td class='tab_bg_1' align='center'>" . call_user_func(array($itemtype, 'getTypeName')) . "</td>";
         echo "<td class='tab_bg_1'>";
         echo "<input type='hidden' name='ids[{$itemtype}][id]' value='" . $value["id"] . "'>";
         echo "<input type='hidden' name='ids[{$itemtype}][itemtype]' value='{$itemtype}'>";
         echo "<input type='text' name='ids[{$itemtype}][template]' value=\"" . $value["template"] . "\">";
         echo "</td>";
         echo "<td class='tab_bg_1' align='center'>";
         Dropdown::showYesNo("ids[{$itemtype}][is_active]", $value["is_active"]);
         echo "</td>";
         echo "<td class='tab_bg_1' align='center'>";
         Dropdown::showYesNo("ids[{$itemtype}][use_index]", $value["use_index"]);
         echo "</td>";
         echo "<td class='tab_bg_1' align='center'>";
         if ($value["is_active"] && !$value["use_index"]) {
             echo "<input type='text' name='ids[{$itemtype}][index]' value='" . $value['index'] . "' size='12'>";
         }
         echo "</td>";
         echo "</tr>";
     }
     echo "<tr class='tab_bg_1'><td align='center' colspan='5'>";
     echo "<input type='submit' name='update_fields' value=\"" . _sx('button', 'Save') . "\" class='submit'>";
     echo "</td></tr>";
     echo "</table>";
     Html::closeForm();
 }
开发者ID:paisdelconocimiento,项目名称:glpi-smartcities,代码行数:43,代码来源:configfield.class.php


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