当前位置: 首页>>代码示例>>PHP>>正文


PHP NotificationManager::getNotificationMessage方法代码示例

本文整理汇总了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>')));
 }
开发者ID:selwyntcy,项目名称:pkp-lib,代码行数:16,代码来源:NotificationsGridCellProvider.inc.php

示例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')));
 }
开发者ID:jprk,项目名称:pkp-lib,代码行数:23,代码来源:NotificationsGridCellProvider.inc.php


注:本文中的NotificationManager::getNotificationMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。