本文整理汇总了PHP中NotificationManager::getNotificationMessage方法的典型用法代码示例。如果您正苦于以下问题:PHP NotificationManager::getNotificationMessage方法的具体用法?PHP NotificationManager::getNotificationMessage怎么用?PHP NotificationManager::getNotificationMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类NotificationManager
的用法示例。
在下文中一共展示了NotificationManager::getNotificationMessage方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getCellActions
/**
* Get cell actions associated with this row/column combination
* @param $row GridRow
* @param $column GridColumn
* @return array an array of LinkAction instances
*/
function getCellActions($request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT)
{
assert($column->getId() == 'task');
$notification = $row->getData();
$contextDao = Application::getContextDAO();
$context = $contextDao->getById($notification->getContextId());
$notificationMgr = new NotificationManager();
$router = $request->getRouter();
return array(new LinkAction('details', new AjaxAction($router->url($request, null, null, 'markRead', null, array('redirect' => 1, 'selectedElements' => array($notification->getId())))), ($notification->getDateRead() ? '' : '<strong>') . __('common.tasks.titleAndTask', array('acronym' => $context->getLocalizedAcronym(), 'title' => $this->_getTitle($notification), 'task' => $notificationMgr->getNotificationMessage($request, $notification))) . ($notification->getDateRead() ? '' : '</strong>')));
}
示例2: getCellActions
/**
* Get cell actions associated with this row/column combination
* @param $row GridRow
* @param $column GridColumn
* @return array an array of LinkAction instances
*/
function getCellActions($request, $row, $column, $position = GRID_ACTION_POSITION_DEFAULT)
{
assert($column->getId() == 'task');
$templateMgr = TemplateManager::getManager($request);
$notification = $row->getData();
$contextDao = Application::getContextDAO();
$context = $contextDao->getById($notification->getContextId());
$notificationMgr = new NotificationManager();
$router = $request->getRouter();
$templateMgr->assign(array('notificationMgr' => $notificationMgr, 'notification' => $notification, 'context' => $context, 'notificationObjectTitle' => $this->_getTitle($notification), 'message' => PKPString::stripUnsafeHtml($notificationMgr->getNotificationMessage($request, $notification))));
// See if we're working in a multi-context environment
$user = $request->getUser();
$contextDao = Application::getContextDAO();
$contexts = $contextDao->getAvailable($user ? $user->getId() : null)->toArray();
$templateMgr->assign('isMultiContext', count($contexts) > 1);
return array(new LinkAction('details', new AjaxAction($router->url($request, null, null, 'markRead', null, array('redirect' => 1, 'selectedElements' => array($notification->getId())))), $templateMgr->fetch('controllers/grid/tasks/task.tpl')));
}