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


PHP Infocom::dropdownAlert方法代码示例

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


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

示例1: showAdditionalInformation

 /**
  * @param $info      array
  * @param $option    array
  **/
 function showAdditionalInformation($info = array(), $option = array())
 {
     $name = "info[" . $option['linkfield'] . "]";
     switch ($option['displaytype']) {
         case 'sink_type':
             Infocom::dropdownAmortType($name);
             break;
         case 'alert':
             Infocom::dropdownAlert(array('name' => $name));
             break;
         default:
             break;
     }
 }
开发者ID:JULIO8,项目名称:respaldo_glpi,代码行数:18,代码来源:infocominjection.class.php

示例2: getSpecificValueToSelect

 /**
  * @since version 0.84
  *
  * @param $field
  * @param $name               (default '')
  * @param $values             (default '')
  * @param $options      array
  **/
 static function getSpecificValueToSelect($field, $name = '', $values = '', array $options = array())
 {
     global $DB;
     if (!is_array($values)) {
         $values = array($field => $values);
     }
     $options['display'] = false;
     switch ($field) {
         case 'use_licenses_alert':
         case 'use_contracts_alert':
         case 'use_infocoms_alert':
             $options['name'] = $name;
             $options['value'] = $values[$field];
             return Alert::dropdownYesNo($options);
         case 'cartridges_alert_repeat':
         case 'consumables_alert_repeat':
             $options['name'] = $name;
             $options['value'] = $values[$field];
             return Alert::dropdown($options);
         case 'send_contracts_alert_before_delay':
         case 'send_infocoms_alert_before_delay':
         case 'send_licenses_alert_before_delay':
             $options['unit'] = 'day';
             $options['never_string'] = __('No');
             return Alert::dropdownIntegerNever($name, $values[$field], $options);
         case 'use_reservations_alert':
             $options['unit'] = 'hour';
             return Alert::dropdownIntegerNever($name, $values[$field], $options);
         case 'notclosed_delay':
             $options['unit'] = 'hour';
             return Alert::dropdownIntegerNever($name, $values[$field], $options);
         case 'auto_assign_mode':
             $options['name'] = $name;
             $options['value'] = $values[$field];
             return self::dropdownAutoAssignMode($options);
         case 'tickettype':
             $options['value'] = $values[$field];
             $options['toadd'] = array(self::CONFIG_PARENT => __('Inheritance of the parent entity'));
             return Ticket::dropdownType($name, $options);
         case 'autofill_buy_date':
         case 'autofill_order_date':
         case 'autofill_delivery_date':
         case 'autofill_use_date':
             $tab[0] = __('No autofill');
             $tab[self::CONFIG_PARENT] = __('Inheritance of the parent entity');
             foreach (getAllDatasFromTable('glpi_states') as $state) {
                 $tab[Infocom::ON_STATUS_CHANGE . '_' . $state['id']] = sprintf(__('Fill when shifting to state %s'), $state['name']);
             }
             $tab[Infocom::COPY_WARRANTY_DATE] = __('Copy the start date of warranty');
             if ($field != 'autofill_buy_date') {
                 $tab[Infocom::COPY_BUY_DATE] = __('Copy the date of purchase');
                 if ($field != 'autofill_order_date') {
                     $tab[Infocom::COPY_ORDER_DATE] = __('Copy the order date');
                     if ($field != 'autofill_delivery_date') {
                         $options[Infocom::COPY_DELIVERY_DATE] = __('Copy the delivery date');
                     }
                 }
             }
             $options['value'] = $values[$field];
             return Dropdown::showFromArray($name, $tab, $options);
         case 'autofill_warranty_date':
             $tab = array(0 => __('No autofill'), Infocom::COPY_BUY_DATE => __('Copy the date of purchase'), Infocom::COPY_ORDER_DATE => __('Copy the order date'), Infocom::COPY_DELIVERY_DATE => __('Copy the delivery date'), self::CONFIG_PARENT => __('Inheritance of the parent entity'));
             $options['value'] = $values[$field];
             return Dropdown::showFromArray($name, $tab, $options);
         case 'inquest_config':
             $typeinquest = array(self::CONFIG_PARENT => __('Inheritance of the parent entity'), 1 => __('Internal survey'), 2 => __('External survey'));
             $options['value'] = $values[$field];
             return Dropdown::showFromArray($name, $typeinquest, $options);
         case 'default_contract_alert':
             $options['name'] = $name;
             $options['value'] = $values[$field];
             return Contract::dropdownAlert($options);
         case 'default_infocom_alert':
             $options['name'] = $name;
             $options['value'] = $values[$field];
             return Infocom::dropdownAlert($options);
         case 'entities_id_software':
             $options['toadd'] = array(self::CONFIG_NEVER => __('No change of entity'));
             // Keep software in PC entity
             $options['toadd'][self::CONFIG_PARENT] = __('Inheritance of the parent entity');
             return self::dropdown($options);
     }
     return parent::getSpecificValueToSelect($field, $name, $values, $options);
 }
开发者ID:korial29,项目名称:glpi,代码行数:92,代码来源:entity.class.php

示例3: getItemTypeForTable

                 $newtype = getItemTypeForTable($search["table"]);
                 if ($newtype != $_POST["itemtype"]) {
                     $item = new $newtype();
                 }
                 autocompletionTextField($item, $search["field"], array('name' => $search["linkfield"], 'entity' => $_SESSION["glpiactive_entity"]));
             }
     }
 } else {
     switch ($search["table"]) {
         case "glpi_infocoms":
             // infocoms case
             echo "<input type='hidden' name='field' value='" . $search["field"] . "'>";
             $FIELDNAME_PRINTED = true;
             switch ($search["field"]) {
                 case "alert":
                     Infocom::dropdownAlert($search["field"]);
                     break;
                 case "buy_date":
                 case "use_date":
                 case "delivery_date":
                 case "order_date":
                 case "inventory_date":
                 case "warranty_date":
                     showDateFormItem($search["field"]);
                     echo "&nbsp;&nbsp;";
                     break;
                 case "sink_type":
                     Infocom::dropdownAmortType("sink_type");
                     break;
                 case "sink_time":
                     Dropdown::showInteger("sink_time", 0, 0, 15);
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:31,代码来源:dropdownMassiveActionField.php


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