本文整理汇总了PHP中DAO_Worker::getAllOnline方法的典型用法代码示例。如果您正苦于以下问题:PHP DAO_Worker::getAllOnline方法的具体用法?PHP DAO_Worker::getAllOnline怎么用?PHP DAO_Worker::getAllOnline使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DAO_Worker
的用法示例。
在下文中一共展示了DAO_Worker::getAllOnline方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: render
function render()
{
$active_worker = PortSensorApplication::getActiveWorker();
$visit = PortSensorApplication::getVisit();
$tpl = DevblocksPlatform::getTemplateService();
$tpl->assign('path', $this->_TPL_PATH);
$response = DevblocksPlatform::getHttpResponse();
$tpl->assign('request_path', implode('/', $response->path));
// Remember the last tab/URL
if (null == ($selected_tab = @$response->path[1])) {
$selected_tab = $visit->get(PortSensorVisit::KEY_HOME_SELECTED_TAB, 'notifications');
}
$tpl->assign('selected_tab', $selected_tab);
$tab_manifests = DevblocksPlatform::getExtensions('portsensor.home.tab', false);
$tpl->assign('tab_manifests', $tab_manifests);
// Custom workspaces
$workspaces = DAO_Worklist::getWorkspaces($active_worker->id);
$tpl->assign('workspaces', $workspaces);
// ====== Who's Online
$whos_online = DAO_Worker::getAllOnline();
if (!empty($whos_online)) {
$tpl->assign('whos_online', $whos_online);
$tpl->assign('whos_online_count', count($whos_online));
}
$tpl->display('file:' . $this->_TPL_PATH . 'home/index.tpl');
}
示例2: render
function render()
{
$active_worker = FegApplication::getActiveWorker();
$visit = FegApplication::getVisit();
$tpl = DevblocksPlatform::getTemplateService();
$tpl->assign('path', $this->_TPL_PATH);
$response = DevblocksPlatform::getHttpResponse();
$tpl->assign('request_path', implode('/', $response->path));
// ====== Who's Online
$whos_online = DAO_Worker::getAllOnline();
if (!empty($whos_online)) {
$tpl->assign('whos_online', $whos_online);
$tpl->assign('whos_online_count', count($whos_online));
}
$tpl->display('file:' . $this->_TPL_PATH . 'stats/index.tpl');
}
示例3: render
function render()
{
$tpl = DevblocksPlatform::getTemplateService();
$tpl->assign('path', $this->_TPL_PATH);
$active_worker = FegApplication::getActiveWorker();
$visit = FegApplication::getVisit();
$response = DevblocksPlatform::getHttpResponse();
$translate = DevblocksPlatform::getTranslationService();
$url = DevblocksPlatform::getUrlService();
$stack = $response->path;
@array_shift($stack);
// customer
@($customer_id = array_shift($stack));
@($customer = DAO_CustomerAccount::get($customer_id));
if (empty($customer)) {
echo "<H1>" . $translate->_('customer.display.invalid_customer') . "</H1>";
return;
}
$tpl->assign('customer_id', $customer_id);
// Tabs
$tab_manifests = DevblocksPlatform::getExtensions('feg.customer.tab', false);
$tpl->assign('tab_manifests', $tab_manifests);
@($tab_selected = array_shift($stack));
if (empty($tab_selected)) {
$tab_selected = 'property';
}
$tpl->assign('tab_selected', $tab_selected);
switch ($tab_selected) {
case 'property':
@($tab_parm = array_shift($stack));
break;
}
// ====== Who's Online
$whos_online = DAO_Worker::getAllOnline();
if (!empty($whos_online)) {
$tpl->assign('whos_online', $whos_online);
$tpl->assign('whos_online_count', count($whos_online));
}
$tpl->display('file:' . $this->_TPL_PATH . 'customer/index.tpl');
}
示例4: showOverviewTabAction
//.........这里部分代码省略.........
// tickets
@($controller = array_shift($response_path));
// overview
// Make sure the global URL was for us
if (0 != strcasecmp('overview', $controller)) {
$response_path = null;
}
$workers = DAO_Worker::getAll();
$tpl->assign('workers', $workers);
$active_worker = CerberusApplication::getActiveWorker();
$groups = DAO_Group::getAll();
$tpl->assign('groups', $groups);
$group_buckets = DAO_Bucket::getTeams();
$tpl->assign('group_buckets', $group_buckets);
$workers = DAO_Worker::getAll();
$tpl->assign('workers', $workers);
$memberships = $active_worker->getMemberships();
// Totals
$group_counts = DAO_Overview::getGroupTotals();
$tpl->assign('group_counts', $group_counts);
$waiting_counts = DAO_Overview::getWaitingTotals();
$tpl->assign('waiting_counts', $waiting_counts);
$worker_counts = DAO_Overview::getWorkerTotals();
$tpl->assign('worker_counts', $worker_counts);
// All Open
$defaults = new C4_AbstractViewModel();
$defaults->class_name = 'C4_TicketView';
$defaults->id = CerberusApplication::VIEW_OVERVIEW_ALL;
$defaults->name = $translate->_('mail.overview.all_groups');
$defaults->view_columns = array(SearchFields_Ticket::TICKET_LAST_ACTION_CODE, SearchFields_Ticket::TICKET_UPDATED_DATE, SearchFields_Ticket::TICKET_TEAM_ID, SearchFields_Ticket::TICKET_CATEGORY_ID, SearchFields_Ticket::TICKET_NEXT_WORKER_ID);
$defaults->renderLimit = 10;
$defaults->renderSortBy = SearchFields_Ticket::TICKET_UPDATED_DATE;
$defaults->renderSortAsc = 0;
$title = $translate->_('mail.overview.all_groups');
$overView = C4_AbstractViewLoader::getView(CerberusApplication::VIEW_OVERVIEW_ALL, $defaults);
$overView->renderPage = 0;
// Filter persistence
if (empty($response_path)) {
@($response_path = explode('/', $visit->get(CerberusVisit::KEY_OVERVIEW_FILTER, 'all')));
} else {
// View Filter
$visit->set(CerberusVisit::KEY_OVERVIEW_FILTER, implode('/', $response_path));
}
@($filter = array_shift($response_path));
switch ($filter) {
case 'group':
@($filter_group_id = array_shift($response_path));
$overView->params = array(SearchFields_Ticket::TICKET_CLOSED => new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_CLOSED, '=', CerberusTicketStatus::OPEN), SearchFields_Ticket::TICKET_WAITING => new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_WAITING, '=', 0));
if (!is_null($filter_group_id) && isset($groups[$filter_group_id])) {
$tpl->assign('filter_group_id', $filter_group_id);
$title = $groups[$filter_group_id]->name;
$overView->params[SearchFields_Ticket::TICKET_TEAM_ID] = new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_TEAM_ID, '=', $filter_group_id);
@($filter_bucket_id = array_shift($response_path));
if (!is_null($filter_bucket_id)) {
$tpl->assign('filter_bucket_id', $filter_bucket_id);
@($title .= ': ' . ($filter_bucket_id == 0 ? $translate->_('common.inbox') : $group_buckets[$filter_group_id][$filter_bucket_id]->name));
$overView->params[SearchFields_Ticket::TICKET_CATEGORY_ID] = new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_CATEGORY_ID, '=', $filter_bucket_id);
}
}
break;
case 'waiting':
@($filter_group_id = array_shift($response_path));
$overView->params = array(SearchFields_Ticket::TICKET_CLOSED => new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_CLOSED, '=', CerberusTicketStatus::OPEN), SearchFields_Ticket::TICKET_WAITING => new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_WAITING, '=', 1));
if (!is_null($filter_group_id) && isset($groups[$filter_group_id])) {
$tpl->assign('filter_group_id', $filter_group_id);
$title = vsprintf($translate->_('mail.overview.waiting.title'), $groups[$filter_group_id]->name);
$overView->params[SearchFields_Ticket::TICKET_TEAM_ID] = new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_TEAM_ID, '=', $filter_group_id);
}
break;
case 'worker':
@($filter_worker_id = array_shift($response_path));
$overView->params = array(SearchFields_Ticket::TICKET_CLOSED => new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_CLOSED, '=', CerberusTicketStatus::OPEN), SearchFields_Ticket::TICKET_WAITING => new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_WAITING, '=', 0), $overView->params[SearchFields_Ticket::TICKET_TEAM_ID] = new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_TEAM_ID, 'in', array_keys($memberships)));
if (!is_null($filter_worker_id)) {
$title = vsprintf($translate->_('mail.overview.assigned.title'), $workers[$filter_worker_id]->getName());
$overView->params[SearchFields_Ticket::TICKET_NEXT_WORKER_ID] = new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_NEXT_WORKER_ID, '=', $filter_worker_id);
@($filter_group_id = array_shift($response_path));
if (!is_null($filter_group_id) && isset($groups[$filter_group_id])) {
$overView->params[SearchFields_Ticket::TICKET_TEAM_ID] = new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_TEAM_ID, '=', $filter_group_id);
}
}
break;
case 'all':
default:
$overView->params = array(SearchFields_Ticket::TICKET_CLOSED => new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_CLOSED, '=', CerberusTicketStatus::OPEN), SearchFields_Ticket::TICKET_WAITING => new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_WAITING, '=', 0), SearchFields_Ticket::TICKET_TEAM_ID => new DevblocksSearchCriteria(SearchFields_Ticket::TICKET_TEAM_ID, 'in', array_keys($memberships)));
break;
}
$overView->name = $title;
C4_AbstractViewLoader::setView($overView->id, $overView);
$views[] = $overView;
$tpl->assign('views', $views);
// Log activity
DAO_Worker::logActivity($active_worker->id, new Model_Activity('activity.mail.overview', array('<i>' . $overView->name . '</i>')));
// ====== Who's Online
$whos_online = DAO_Worker::getAllOnline();
if (!empty($whos_online)) {
$tpl->assign('whos_online', $whos_online);
$tpl->assign('whos_online_count', count($whos_online));
}
$tpl->display('file:' . $this->_TPL_PATH . 'tickets/overview/index.tpl');
}