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


PHP NotificationManager::getParamsForCurrentLocale方法代码示例

本文整理汇总了PHP中NotificationManager::getParamsForCurrentLocale方法的典型用法代码示例。如果您正苦于以下问题:PHP NotificationManager::getParamsForCurrentLocale方法的具体用法?PHP NotificationManager::getParamsForCurrentLocale怎么用?PHP NotificationManager::getParamsForCurrentLocale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NotificationManager的用法示例。


在下文中一共展示了NotificationManager::getParamsForCurrentLocale方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: callbackNotificationContents

 /**
  * Hook registry function to provide notification messages for SWORD notifications
  * @param $hookName string
  * @param $args array
  */
 function callbackNotificationContents($hookName, $args)
 {
     $notification =& $args[0];
     $message =& $args[1];
     $type = $notification->getType();
     assert(isset($type));
     import('classes.notification.NotificationManager');
     $notificationManager = new NotificationManager();
     switch ($type) {
         case NOTIFICATION_TYPE_SWORD_DEPOSIT_COMPLETE:
             $notificationSettingsDao = DAORegistry::getDAO('NotificationSettingsDAO');
             $params = $notificationSettingsDao->getNotificationSettings($notification->getId());
             $message = __('plugins.generic.sword.depositComplete', $notificationManager->getParamsForCurrentLocale($params));
             break;
         case NOTIFICATION_TYPE_SWORD_AUTO_DEPOSIT_COMPLETE:
             $notificationSettingsDao = DAORegistry::getDAO('NotificationSettingsDAO');
             $params = $notificationSettingsDao->getNotificationSettings($notification->getId());
             $message = __('plugins.generic.sword.automaticDepositComplete', $notificationManager->getParamsForCurrentLocale($params));
             break;
         case NOTIFICATION_TYPE_SWORD_ENABLED:
             $message = __('plugins.generic.sword.enabled');
             break;
     }
 }
开发者ID:jalperin,项目名称:ojs,代码行数:29,代码来源:SwordPlugin.inc.php

示例2: getNotificationContents

 /**
  * Hook callback: add content to custom notifications
  * @see NotificationManager::getNotificationContents()
  */
 function getNotificationContents($hookName, $args)
 {
     $notification =& $args[0];
     $message =& $args[1];
     $type = $notification->getType();
     assert(isset($type));
     import('classes.notification.NotificationManager');
     $notificationManager = new NotificationManager();
     switch ($type) {
         case NOTIFICATION_TYPE_ERROR:
             $message = __('plugins.generic.dataverse.notification.error');
             break;
         case NOTIFICATION_TYPE_DATAVERSE_FILE_ADDED:
             $message = __('plugins.generic.dataverse.notification.fileAdded');
             break;
         case NOTIFICATION_TYPE_DATAVERSE_FILE_DELETED:
             $message = __('plugins.generic.dataverse.notification.fileDeleted');
             break;
         case NOTIFICATION_TYPE_DATAVERSE_STUDY_CREATED:
             $message = __('plugins.generic.dataverse.notification.studyCreated');
             break;
         case NOTIFICATION_TYPE_DATAVERSE_STUDY_UPDATED:
             $message = __('plugins.generic.dataverse.notification.studyUpdated');
             break;
         case NOTIFICATION_TYPE_DATAVERSE_STUDY_DELETED:
             $message = __('plugins.generic.dataverse.notification.studyDeleted');
             break;
         case NOTIFICATION_TYPE_DATAVERSE_STUDY_RELEASED:
             $notificationSettingsDao =& DAORegistry::getDAO('NotificationSettingsDAO');
             $params = $notificationSettingsDao->getNotificationSettings($notification->getId());
             $message = __('plugins.generic.dataverse.notification.studyReleased', $notificationManager->getParamsForCurrentLocale($params));
             break;
         case NOTIFICATION_TYPE_DATAVERSE_UNRELEASED:
             $notificationSettingsDao =& DAORegistry::getDAO('NotificationSettingsDAO');
             $params = $notificationSettingsDao->getNotificationSettings($notification->getId());
             $message = __('plugins.generic.dataverse.notification.releaseDataverse', $notificationManager->getParamsForCurrentLocale($params));
             break;
     }
 }
开发者ID:farhanabbas1983,项目名称:ojs-1,代码行数:43,代码来源:DataversePlugin.inc.php


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