本文整理匯總了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');
}