本文整理汇总了PHP中Change::getAllStatusArray方法的典型用法代码示例。如果您正苦于以下问题:PHP Change::getAllStatusArray方法的具体用法?PHP Change::getAllStatusArray怎么用?PHP Change::getAllStatusArray使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Change
的用法示例。
在下文中一共展示了Change::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>";
}
示例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>";
}