本文整理汇总了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;
}
}
示例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;
}
}