本文整理汇总了PHP中app::getFilterProjects方法的典型用法代码示例。如果您正苦于以下问题:PHP app::getFilterProjects方法的具体用法?PHP app::getFilterProjects怎么用?PHP app::getFilterProjects使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类app
的用法示例。
在下文中一共展示了app::getFilterProjects方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: executeFilters
public function executeFilters(sfWebRequest $request)
{
$m = array();
$params = (int) $request->getParameter('projects_id') > 0 ? 'projects_id=' . $request->getParameter('projects_id') : false;
$m = app::getFilterMenuItemsByTable($m, 'DiscussionsStatus', 'Status', 'discussions/index', $params);
$m = app::getFilterMenuUsers($m, 'DiscussionsAssignedTo', 'Assigned To', 'discussions/index', $params);
$m = app::getFilterMenuUsers($m, 'DiscussionsCreatedBy', 'Created By', 'discussions/index', $params);
if (!$params) {
$m = app::getFilterProjects($m, 'discussions/index', $params, array(), $this->getUser());
$m = app::getFilterMenuItemsByTable($m, 'ProjectsStatus', 'Projects Status', 'discussions/index', $params);
$m = app::getFilterMenuItemsByTable($m, 'ProjectsTypes', 'Projects Types', 'discussions/index', $params);
}
$this->m = array(array('title' => __('Filters'), 'submenu' => $m));
}
示例2: executeFilters
public function executeFilters(sfWebRequest $request)
{
$m = array();
$params = (int) $request->getParameter('projects_id') > 0 ? 'projects_id=' . $request->getParameter('projects_id') : false;
$m = app::getFilterMenuItemsByTable($m, 'TasksPriority', 'Priority', 'ganttChart/index', $params);
$m = app::getFilterMenuStatusItemsByTable($m, 'TasksStatus', 'Status', 'ganttChart/index', $params);
$m = app::getFilterMenuItemsByTable($m, 'TasksLabels', 'Label', 'ganttChart/index', $params);
$m = app::getFilterMenuItemsByTable($m, 'TasksTypes', 'Type', 'ganttChart/index', $params);
$m = app::getFilterMenuUsers($m, 'TasksAssignedTo', 'Assigned To', 'ganttChart/index', $params);
$m = app::getFilterMenuUsers($m, 'TasksCreatedBy', 'Created By', 'ganttChart/index', $params);
if (!$params) {
$m = app::getFilterProjects($m, 'ganttChart/index', $params, array(), $this->getUser());
$m = app::getFilterMenuStatusItemsByTable($m, 'ProjectsStatus', 'Project Status', 'ganttChart/index', $params);
$m = app::getFilterMenuItemsByTable($m, 'ProjectsTypes', 'Project Type', 'ganttChart/index', $params);
} else {
$m = app::getFilterMenuItemsByTable($m, 'TasksGroups', 'Group', 'ganttChart/index', $params);
$m = app::getFilterMenuItemsByTable($m, 'ProjectsPhases', 'Phase', 'ganttChart/index', $params);
$m = app::getFilterMenuItemsByTable($m, 'Versions', 'Version', 'ganttChart/index', $params);
}
$this->m = array(array('title' => __('Filters'), 'submenu' => $m));
}
示例3: switch
?>
</td>
<td valign="top"><div id="filtersPreviewMenuBox">
<?php
switch ($table) {
case 'TasksStatus':
$m = app::getFilterMenuStatusItemsByTable(array(), $table, 'Status', 'timeReport/' . $action_name, $params, $filter_by[$table]);
break;
case 'TasksAssignedTo':
$m = app::getFilterMenuUsers(array(), $table, 'Assigned To', 'timeReport/' . $action_name, $params, $filter_by[$table]);
break;
case 'TasksCreatedBy':
$m = app::getFilterMenuUsers(array(), $table, 'Created By', 'timeReport/' . $action_name, $params, $filter_by[$table]);
break;
case 'Projects':
$m = app::getFilterProjects(array(), 'timeReport/' . $action_name, $params, $filter_by[$table], $sf_user);
break;
default:
$m = app::getFilterMenuItemsByTable(array(), $table, $title, 'timeReport/' . $action_name, $params, $filter_by[$table], $sf_user);
break;
}
echo renderYuiMenu('filtersMenu' . $table, $m);
?>
</div></td>
<td valign="top" class="selectedFilterItems"><?php
echo strstr($table, 'extraField') ? $filter_by[$table] : app::getNameByTableId($table, $filter_by[$table]);
?>
</td>
</tr>
</table>
</div>
示例4: switch
<?php
if (strstr($table, 'extraField')) {
$m = app::getFilterExtraFields(array(), $table, 'discussions', 'discussions/index', false, $filter_by[$table], $sf_user);
} else {
switch ($table) {
case 'DiscussionsStatus':
$m = app::getFilterMenuStatusItemsByTable(array(), $table, 'Status', 'discussions/index', $params, $filter_by[$table]);
break;
case 'DiscussionsAssignedTo':
$m = app::getFilterMenuUsers(array(), $table, 'Assigned To', 'discussions/index', $params, $filter_by[$table]);
break;
case 'DiscussionsCreatedBy':
$m = app::getFilterMenuUsers(array(), $table, 'Created By', 'discussions/index', $params, $filter_by[$table]);
break;
case 'Projects':
$m = app::getFilterProjects(array(), 'discussions/index', $params, $filter_by[$table], $sf_user);
break;
case 'ProjectsStatus':
$m = app::getFilterMenuStatusItemsByTable(array(), $table, 'Project Status', 'discussions/index', $params, $filter_by[$table]);
break;
default:
$m = app::getFilterMenuItemsByTable(array(), $table, $title, 'discussions/index', $params, $filter_by[$table], $sf_user);
break;
}
}
echo renderYuiMenu('filtersMenu' . $table, $m);
?>
</div></td>
<td valign="top" class="selectedFilterItems"><?php
echo strstr($table, 'extraField') ? $filter_by[$table] : app::getNameByTableId($table, $filter_by[$table]);
?>
示例5: link_to
<tr>
<td valign="top" style="padding-top: 2px;"><?php
echo link_to(image_tag('icons/close_gray.png'), 'tickets/index?remove_filter=' . $table . ($params ? '&' . $params : ''), array('title' => __('Remove Filter')));
?>
</td>
<td valign="top"><div id="filtersPreviewMenuBox">
<?php
if (strstr($table, 'extraField')) {
$m = app::getFilterExtraFields(array(), $table, 'tickets', 'tickets/index', false, $filter_by[$table], $sf_user);
} else {
switch ($table) {
case 'TicketsCreatedBy':
$m = app::getFilterMenuUsers(array(), $table, 'Created By', 'tickets/index', $params, $filter_by[$table]);
break;
case 'Projects':
$m = app::getFilterProjects(array(), 'tickets/index', $params, $filter_by[$table], $sf_user);
break;
default:
$m = app::getFilterMenuItemsByTable(array(), $table, $title, 'tickets/index', $params, $filter_by[$table], $sf_user);
break;
}
}
echo renderYuiMenu('filtersMenu' . $table, $m);
?>
</div></td>
<td valign="top" class="selectedFilterItems"><?php
echo strstr($table, 'extraField') ? $filter_by[$table] : app::getNameByTableId($table, $filter_by[$table]);
?>
</td>
</tr>
</table>