本文整理汇总了PHP中AppLocale::reloadLocale方法的典型用法代码示例。如果您正苦于以下问题:PHP AppLocale::reloadLocale方法的具体用法?PHP AppLocale::reloadLocale怎么用?PHP AppLocale::reloadLocale使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppLocale
的用法示例。
在下文中一共展示了AppLocale::reloadLocale方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: reloadLocale
/**
* Reload data for an installed locale.
* @param $args array
* @param $request object
*/
function reloadLocale($args, &$request)
{
$this->validate();
$site =& $request->getSite();
$locale = $request->getUserVar('locale');
if (in_array($locale, $site->getInstalledLocales())) {
AppLocale::reloadLocale($locale);
}
$request->redirect(null, null, 'languages');
}
示例2: reloadLocale
/**
* Reload locale.
* @param $args array
* @param $request Request
* @return JSONMessage JSON object
*/
function reloadLocale($args, $request)
{
$site = $request->getSite();
$locale = $request->getUserVar('rowId');
$gridData = $this->getGridDataElements($request);
if (array_key_exists($locale, $gridData)) {
AppLocale::reloadLocale($locale);
$notificationManager = new NotificationManager();
$user = $request->getUser();
$notificationManager->createTrivialNotification($user->getId(), NOTIFICATION_TYPE_SUCCESS, array('contents' => __('notification.localeReloaded', array('locale' => $gridData[$locale]['name']))));
}
return DAO::getDataChangedEvent($locale);
}
示例3: reloadLocale
/**
* Reload data for an installed locale.
* @param $args array
* @param $request object
*/
function reloadLocale($args, &$request)
{
$this->validate();
$site =& $request->getSite();
$locale = $request->getUserVar('locale');
if (in_array($locale, $site->getInstalledLocales())) {
AppLocale::reloadLocale($locale);
$user =& $request->getUser();
import('classes.notification.NotificationManager');
$notificationManager = new NotificationManager();
$notificationManager->createTrivialNotification($user->getId());
}
$request->redirect(null, null, 'languages');
}