本文整理汇总了PHP中Locales::getList方法的典型用法代码示例。如果您正苦于以下问题:PHP Locales::getList方法的具体用法?PHP Locales::getList怎么用?PHP Locales::getList使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Locales
的用法示例。
在下文中一共展示了Locales::getList方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
function execute()
{
$locale = new Locales('connection');
$list = $locale->getList();
$this->smarty->assign('lang', $list);
$this->smarty->assign('slide', connectionSliderModel::create()->where(array('id' => (int) Request::post('id')))->fetchOne());
}
示例2: execute
function execute()
{
$model = connectionSliderModel::create();
$locale = new Locales('connection');
$list = $locale->getList();
$this->smarty->assign('slides', $model->sort('sort', -1)->fetchAll());
$this->smarty->assign('lang', $list);
}
示例3: execute
function execute()
{
$locale = new Locales('connection');
$list = $locale->getList();
$page = Request::post('page');
$this->smarty->assign('seo', connectionSeoModel::create()->getByPage($page));
$this->smarty->assign('lang', $list);
}
示例4: execute
function execute()
{
$locale = new Locales('connection');
$list = $locale->getList();
$pageModel = new connectionPagesModel();
$this->smarty->assign('pages', $pageModel->fetchAll());
$this->smarty->assign('lang', $list);
$this->smarty->assign('page_url', Settings::getValue('page_url'));
}
示例5: execute
function execute()
{
$event = Request::post('event');
$eventList = connectionNotificationModel::getEventList();
$locale = new Locales('connection');
$list = $locale->getList();
$this->smarty->assign('eventInfo', $eventList[$event]);
$this->smarty->assign('lang', $list);
$this->smarty->assign('event', connectionNotificationModel::create()->getEvent($event));
}
示例6: execute
function execute()
{
$locale = new Locales('connection');
$list = $locale->getList();
$notification = connectionNotificationModel::create()->where(array('id' => (int) Request::post('id')))->fetchOne();
$eventList = connectionNotificationModel::getEventList();
$this->smarty->assign('eventInfo', $eventList[$notification['event']]);
$this->smarty->assign('lang', $list);
$this->smarty->assign('notification', $notification);
}
示例7: execute
function execute()
{
$this->frame = false;
$locale = new Locales('connection');
$list = $locale->getList();
$this->smarty->assign('lang', $list);
$fieldID = Request::post('id');
$model = new connectionFieldsModel();
$this->smarty->assign('field', $model->getField($fieldID));
}
示例8: execute
function execute()
{
$locale = new Locales('connection');
$list = $locale->getList();
if (Request::post('id')) {
$answer = connectionFaqAnswerModel::create()->where(array('id' => (int) Request::post('id')))->fetchOne();
$this->smarty->assign('answer', $answer);
}
$this->smarty->assign('lang', $list);
}
示例9: execute
function execute()
{
$locale = new Locales('connection');
$list = $locale->getList();
$this->smarty->assign('lang', $list);
$model = new connectionFieldsModel();
$fields = array();
$fields['info'] = $model->getGroup('info');
$fields['interest'] = $model->getGroup('interest');
$this->smarty->assign('fields', $fields);
}
示例10: execute
function execute()
{
$locale = new Locales('connection');
$list = $locale->getList();
$this->smarty->assign('lang', $list);
$model = new connectionCountryModel();
$countries = array();
foreach ($list as $lang) {
$countries[$lang['iso']] = $model->getList($lang['iso']);
}
$this->smarty->assign('country', $countries);
}
示例11: hasVariant
public function hasVariant($id, $variant)
{
$locale = new Locales('connection');
$list = $locale->getList();
$where = array('id' => (int) $id);
foreach ($list as $value) {
$where['$or'][] = array($value['iso'] . '.variant' => $variant);
}
$result = $this->where($where)->fetchAll();
if (sizeof($result) > 0) {
return true;
}
return false;
}
示例12: execute
function execute()
{
$page_id = Request::post('page_id');
if (!$page_id) {
exit;
}
$model = new connectionPagesModel();
$locale = new Locales('connection');
$list = $locale->getList();
$this->smarty->assign('lang', $list);
$this->smarty->assign('page', $model->getPage($page_id));
$this->smarty->display(APP_DIR . DS . App::getAppName() . DS . APP_TEMPLATES_DIR . DS . 'backend' . DS . '/include/modal/pageEdite.html');
exit;
}
示例13: execute
function execute()
{
$status = 'success';
$model = connectionSliderModel::create();
$locale = new Locales('connection');
$list = $locale->getList();
$data = Request::post('slide');
if (!isset($data['link']) || empty($data['link'])) {
$status = 'error';
} else {
if (isset($data['id'])) {
$slide = $model->where(array('id' => (int) $data['id']))->fetchOne();
}
$dir = UPLOAD_DIR . DS . 'slider' . DS;
File::mkdir($dir);
foreach ($list as $lang) {
$file = Request::files('slide_' . $lang['iso']);
if (!$file || empty($file[0]['name'])) {
if (isset($data['id'])) {
$data[$lang['iso']]['image'] = isset($slide[$lang['iso']]['image']) ? $slide[$lang['iso']]['image'] : '';
}
continue;
}
$file = $file[0];
$info = pathinfo($file['name']);
$name = strtotime('now') . md5($file['name']) . uniqid() . '.' . $info['extension'];
File::upload($file, $dir, $name);
$data[$lang['iso']]['image'] = $name;
}
if (isset($data['id'])) {
$id = $data['id'];
unset($data['id']);
$model->where(array('id' => (int) $id))->update($data);
} else {
$data['sort'] = 0;
$model->insert($data);
}
}
return array('status' => $status);
}
示例14: execute
function execute()
{
$app = strtolower(Request::get('app_local'));
$locale = new Locales($app);
$this->smarty->assign('lang', $locale->getList());
}