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


PHP Dropdown::getGlobalSwitch方法代码示例

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


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

示例1: showCacheRuleDetail

 function showCacheRuleDetail($fields)
 {
     global $LANG;
     echo "<td class='tab_bg_2'>" . $fields["old_value"] . "</td>";
     echo "<td class='tab_bg_2'>" . $fields["manufacturer"] . "</td>";
     echo "<td class='tab_bg_2'>" . ($fields["new_value"] != '' ? $fields["new_value"] : $LANG['rulesengine'][106]) . "</td>";
     echo "<td class='tab_bg_2'>" . ($fields["is_global"] != '' ? Dropdown::getGlobalSwitch($fields["is_global"]) : $LANG['rulesengine'][106]) . "</td>";
     echo "<td class='tab_bg_2'>" . (isset($fields["new_manufacturer"]) && $fields["new_manufacturer"] != '' ? Dropdown::getDropdownName("glpi_manufacturers", $fields["new_manufacturer"]) : $LANG['rulesengine'][106]) . "</td>";
     echo "<td class='tab_bg_2'>";
     if ($fields["ignore_ocs_import"] == '') {
         echo "&nbsp;";
     } else {
         echo Dropdown::getYesNo($fields["ignore_ocs_import"]);
     }
     echo "</td>";
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:16,代码来源:ruledictionnaryprinter.class.php

示例2: getActionValue

 /**
  * Return a "display" value associated with a pattern associated to a criteria
  *
  * @param $ID     the given action
  * @param $type   the type of action
  * @param $value  the value
  **/
 function getActionValue($ID, $type, $value)
 {
     $action = $this->getAction($ID);
     if (isset($action['type'])) {
         switch ($action['type']) {
             case "dropdown":
                 if ($type == 'fromuser' || $type == 'fromitem') {
                     return Dropdown::getYesNo($value);
                 }
                 // $type == assign
                 $tmp = Dropdown::getDropdownName($action["table"], $value);
                 return $tmp == '&nbsp;' ? NOT_AVAILABLE : $tmp;
             case "dropdown_status":
                 return Ticket::getStatus($value);
             case "dropdown_assign":
             case "dropdown_users":
             case "dropdown_users_validate":
                 return getUserName($value);
             case "dropdown_groups_validate":
                 return Dropdown::getDropdownName('glpi_groups', $value);
             case "dropdown_validation_percent":
                 return Dropdown::getValueWithUnit($value, '%');
             case "yesonly":
             case "yesno":
                 return Dropdown::getYesNo($value);
             case "dropdown_urgency":
                 return Ticket::getUrgencyName($value);
             case "dropdown_impact":
                 return Ticket::getImpactName($value);
             case "dropdown_priority":
                 return Ticket::getPriorityName($value);
             case "dropdown_tickettype":
                 return Ticket::getTicketTypeName($value);
             case "dropdown_management":
                 return Dropdown::getGlobalSwitch($value);
             default:
                 return $this->displayAdditionRuleActionValue($value);
         }
     }
     return $value;
 }
开发者ID:pvasener,项目名称:glpi,代码行数:48,代码来源:rule.class.php

示例3: getActionValue

 /**
  * Return a value associated with a pattern associated to a criteria
  *
  * @param $ID the given action
  * @param $value the value
  **/
 function getActionValue($ID, $value)
 {
     global $LANG;
     $action = $this->getAction($ID);
     if (isset($action['type'])) {
         switch ($action['type']) {
             case "dropdown":
                 return Dropdown::getDropdownName($action["table"], $value);
             case "dropdown_status":
                 return Ticket::getStatus($value);
             case "dropdown_assign":
             case "dropdown_users":
             case "dropdown_users_validate":
                 return getUserName($value);
             case "yesonly":
             case "yesno":
                 if ($value) {
                     return $LANG['choice'][1];
                 }
                 return $LANG['choice'][0];
             case "dropdown_urgency":
                 return Ticket::getUrgencyName($value);
             case "dropdown_impact":
                 return Ticket::getImpactName($value);
             case "dropdown_priority":
                 return Ticket::getPriorityName($value);
             case "dropdown_management":
                 return Dropdown::getGlobalSwitch($value);
             default:
                 return $this->displayAdditionRuleActionValue($value);
         }
     }
     return $value;
 }
开发者ID:ryukansent,项目名称:Thesis-SideB,代码行数:40,代码来源:rule.class.php


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