本文整理汇总了PHP中app::getStatusGroupsChoices方法的典型用法代码示例。如果您正苦于以下问题:PHP app::getStatusGroupsChoices方法的具体用法?PHP app::getStatusGroupsChoices怎么用?PHP app::getStatusGroupsChoices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app
的用法示例。
在下文中一共展示了app::getStatusGroupsChoices方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: configure
public function configure()
{
$this->widgetSchema['active'] = new sfWidgetFormInputCheckbox(array(), array('value' => 1));
$this->setDefault('active', 1);
$this->widgetSchema['default_value'] = new sfWidgetFormInputCheckbox(array(), array('value' => 1));
$this->setDefault('default_value', 0);
$this->widgetSchema['group'] = new sfWidgetFormChoice(array('choices' => app::getStatusGroupsChoices()));
$this->widgetSchema['name']->setAttribute('class', 'required');
$this->widgetSchema['sort_order']->setAttribute('size', '3');
$this->widgetSchema->setLabels(array('status_group' => 'Group', 'sort_order' => 'Sort Order', 'default_value' => 'Default?', 'background_color' => 'Background', 'active' => 'Active?'));
}
示例2: executeSortGroupedItemsProcess
public function executeSortGroupedItemsProcess(sfWebRequest $request)
{
$t = $request->getParameter('t');
foreach (app::getStatusGroupsChoices() as $k => $name) {
$sort_order = 0;
foreach (explode(',', $request->getParameter('sorted_items_' . $k)) as $fields_id) {
if ($t == 'tasksStatus') {
$t = 'tasks_status';
}
if ($t == 'ticketsStatus') {
$t = 'tickets_status';
}
$sql = "update " . $t . " ts set ts.group='" . $k . "', ts.sort_order='" . $sort_order . "' where ts.id='" . str_replace('field_', '', $fields_id) . "'";
$connection = Doctrine_Manager::connection();
$connection->execute($sql);
$sort_order++;
}
}
exit;
}
示例3: __
<h1><?php
echo __('Sort Items');
?>
</h1>
<?php
echo __('Just move an item up or down.');
?>
<br>
<?php
foreach (app::getStatusGroupsChoices() as $k => $name) {
echo '<b>' . $name . '</b>';
?>
<ul id="sorted_items_<?php
echo $k;
?>
" class='droptrue'>
<?php
foreach ($itmes as $v) {
if ($v->getGroup() == $k) {
echo '<li id="field_' . $v->getId() . '">' . $v->getName() . '</li>';
}
}
?>
</ul>
<?php
}
?>
<?php