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


PHP Problem::getAllStatusArray方法代码示例

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


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

示例1: showFormLifeCycle

 /**
  * Print the Life Cycles form for the current profile
  *
  * @param $openform   boolean  open the form (true by default)
  * @param $closeform  boolean  close the form (true by default)
  **/
 function showFormLifeCycle($openform = true, $closeform = true)
 {
     if (!self::canView()) {
         return false;
     }
     echo "<div class='spaced'>";
     if (($canedit = Session::haveRightsOr(self::$rightname, array(CREATE, UPDATE, PURGE))) && $openform) {
         echo "<form method='post' action='" . $this->getFormURL() . "'>";
     }
     $this->displayLifeCycleMatrix(__('Life cycle of tickets'), '_cycle_ticket', 'ticket_status', Ticket::getAllStatusArray(), $canedit);
     $this->displayLifeCycleMatrix(__('Life cycle of problems'), '_cycle_problem', 'problem_status', Problem::getAllStatusArray(), $canedit);
     $this->displayLifeCycleMatrix(__('Life cycle of changes'), '_cycle_change', 'change_status', Change::getAllStatusArray(), $canedit);
     if ($canedit && $closeform) {
         echo "<div class='center'>";
         echo "<input type='hidden' name='id' value='" . $this->fields['id'] . "'>";
         echo "<input type='submit' name='update' value=\"" . _sx('button', 'Save') . "\" class='submit'>";
         echo "</div>\n";
         Html::closeForm();
     }
     echo "</div>";
 }
开发者ID:glpi-project,项目名称:glpi,代码行数:27,代码来源:profile.class.php

示例2: showFormLifeCycle

 /**
  * Print the Life Cycles form for the current profile
  *
  * @param $openform   boolean  open the form (true by default)
  * @param $closeform  boolean  close the form (true by default)
  **/
 function showFormLifeCycle($openform = true, $closeform = true)
 {
     if (!Session::haveRight("profile", "r")) {
         return false;
     }
     if (($canedit = Session::haveRight("profile", "w")) && $openform) {
         echo "<form method='post' action='" . $this->getFormURL() . "'>";
     }
     echo "<div class='spaced'>";
     echo "<table class='tab_cadre_fixe'>";
     $tabstatus = Ticket::getAllStatusArray();
     echo "<th colspan='" . (count($tabstatus) + 1) . "'>" . __('Life cycle of tickets') . "</th>";
     //TRANS: \ to split row heading (From) and colums headin (To) for life cycles
     echo "<tr class='tab_bg_1'><td class='b center'>" . __("From \\ To");
     echo "<input type='hidden' name='_cycles_ticket' value='1'</td>";
     foreach ($tabstatus as $label) {
         echo "<td class='center'>{$label}</td>";
     }
     echo "</tr>\n";
     foreach ($tabstatus as $from => $label) {
         echo "<tr class='tab_bg_2'><td class='tab_bg_1'>{$label}</td>";
         foreach ($tabstatus as $dest => $label) {
             echo "<td class='center'>";
             if ($dest == $from) {
                 echo Dropdown::getYesNo(1);
             } else {
                 Dropdown::showYesNo("_cycle_ticket[{$from}][{$dest}]", !isset($this->fields['ticket_status'][$from][$dest]) || $this->fields['ticket_status'][$from][$dest]);
             }
             echo "</td>";
         }
         echo "</tr>\n";
     }
     echo "</table>";
     echo "<table class='tab_cadre_fixe'>";
     $tabstatus = Problem::getAllStatusArray();
     echo "<th colspan='" . (count($tabstatus) + 1) . "'>" . __('Life cycle of problems') . "</th>";
     echo "<tr class='tab_bg_1'><td class='b center'>" . __('From \\ To');
     echo "<input type='hidden' name='_cycles_problem' value='1'</td>";
     foreach ($tabstatus as $label) {
         echo "<td class='center'>{$label}</td>";
     }
     echo "</tr>\n";
     foreach ($tabstatus as $from => $label) {
         echo "<tr class='tab_bg_2'><td class='tab_bg_1'>{$label}</td>";
         foreach ($tabstatus as $dest => $label) {
             echo "<td class='center'>";
             if ($dest == $from) {
                 echo Dropdown::getYesNo(1);
             } else {
                 Dropdown::showYesNo("_cycle_problem[{$from}][{$dest}]", !isset($this->fields['problem_status'][$from][$dest]) || $this->fields['problem_status'][$from][$dest]);
             }
             echo "</td>";
         }
         echo "</tr>\n";
     }
     echo "</table>";
     echo "<table class='tab_cadre_fixe'>";
     $tabstatus = Change::getAllStatusArray();
     //       echo "<th colspan='".(count($tabstatus)+1)."'>".__('Life cycle of changes')."</th>";
     //       echo "<tr class='tab_bg_1'><td class='b center'>".__('From \ To');
     //       echo "<input type='hidden' name='_cycles_change' value='1'</td>";
     //       foreach ($tabstatus as $label) {
     //          echo "<td class='center'>$label</td>";
     //       }
     //       echo "</tr>\n";
     //
     //       foreach ($tabstatus as $from => $label) {
     //          echo "<tr class='tab_bg_2'><td class='tab_bg_1'>$label</td>";
     //          foreach ($tabstatus as $dest => $label) {
     //             echo "<td class='center'>";
     //             if ($dest == $from) {
     //                echo Dropdown::getYesNo(1);
     //             } else {
     //                Dropdown::showYesNo("_cycle_change[$from][$dest]",
     //                                    (!isset($this->fields['change_status'][$from][$dest])
     //                                     || $this->fields['change_status'][$from][$dest]));
     //             }
     //             echo "</td>";
     //          }
     //          echo "</tr>\n";
     //       }
     if ($canedit && $closeform) {
         echo "<tr class='tab_bg_1'>";
         echo "<td colspan='" . (count($tabstatus) + 1) . "' class='center'>";
         echo "<input type='hidden' name='id' value='" . $this->fields['id'] . "'>";
         echo "<input type='submit' name='update' value=\"" . _sx('button', 'Save') . "\" class='submit'>";
         echo "</td></tr>\n";
         echo "</table>\n";
         Html::closeForm();
     } else {
         echo "</table>\n";
     }
     echo "</div>";
 }
开发者ID:gaforeror,项目名称:glpi,代码行数:100,代码来源:profile.class.php


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