當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Campaign::getLanguage方法代碼示例

本文整理匯總了PHP中Campaign::getLanguage方法的典型用法代碼示例。如果您正苦於以下問題:PHP Campaign::getLanguage方法的具體用法?PHP Campaign::getLanguage怎麽用?PHP Campaign::getLanguage使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Campaign的用法示例。


在下文中一共展示了Campaign::getLanguage方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setParams

 public function setParams($params)
 {
     if (Campaign::getLanguage() == 'en') {
         $this->params['providers'] = 'facebook';
         $this->params['hidden'] = 'twitter,google,livejournal,openid,lastfm,linkedin,liveid,steam,soundcloud';
     } elseif (Campaign::getLanguage() == 'ru') {
         $this->params['providers'] = 'vkontakte,facebook';
         $this->params['hidden'] = 'twitter,google,yandex,mailru,livejournal,openid,lastfm,linkedin,liveid,steam,soundcloud';
     }
     $this->params = array_merge($this->params, $params);
 }
開發者ID:akoch-ov,項目名稱:dipstart-development,代碼行數:11,代碼來源:UloginWidget.php

示例2: runController

 public function runController($route)
 {
     Yii::app()->language = Campaign::getLanguage();
     if (($ca = $this->createController($route)) !== null) {
         list($controller, $actionID) = $ca;
         $oldController = $this->getController();
         $this->setController($controller);
         $controller->init();
         $controller->run($actionID);
         $this->setController($oldController);
     } else {
         // 			throw new CHttpException(404,Yii::t('yii','Unable to resolve the request "{route}".',
         // 					array('{route}'=>$route===''?$this->defaultController:$route)));
         throw new CHttpException(404, Yii::t('site', 'The requested page does not exist.'));
     }
 }
開發者ID:kibercoder,項目名稱:dipstart-development,代碼行數:16,代碼來源:DSApplication.php

示例3: init

 public function init()
 {
     // --- Организации
     $c_id = Campaign::getId();
     if ($c_id) {
         Payment::$table_prefix = $c_id . '_';
         //Profile::$table_prefix = $c_id.'_';
         //ProfileField::$table_prefix = $c_id.'_';
         ProjectChanges::$table_prefix = $c_id . '_';
         ProjectChanges::$file_path = 'uploads/c' . $c_id . '/changes_documents';
         //ProjectMessages::$table_prefix = $c_id.'_';
         ProjectPayments::$table_prefix = $c_id . '_';
         Zakaz::$table_prefix = $c_id . '_';
         Zakaz::$files_folder = '/uploads/c' . $c_id . '/';
         Events::$table_prefix = $c_id . '_';
         ZakazParts::$table_prefix = $c_id . '_';
         UpdateProfile::$table_prefix = $c_id . '_';
         ZakazPartsFiles::$table_prefix = $c_id . '_';
         PaymentImage::$table_prefix = $c_id . '_';
         Emails::$table_prefix = $c_id . '_';
         Yii::app()->language = Campaign::getLanguage();
     } else {
         ProjectChanges::$file_path = 'uploads/changes_documents';
     }
     // ---
     if (!Yii::app()->user->isGuest) {
         switch (User::model()->getUserRole()) {
             case 'Manager':
             case 'Admin':
                 Yii::app()->theme = 'admin';
                 break;
             case 'Author':
                 $this->menu = array(array('label' => Yii::t('site', 'My orders'), 'url' => array('/project/zakaz/ownList')), array('label' => Yii::t('site', 'New projects'), 'url' => array('/project/zakaz/list')), array('label' => Yii::t('site', 'Profile'), 'url' => array('/user/profile/edit')), array('label' => Yii::t('site', 'Logout'), 'url' => array('/user/logout')));
                 $this->authMenu = array(array('label' => Yii::t('site', 'Logout'), 'url' => array('/user/logout')));
                 Yii::app()->theme = 'client';
                 break;
             case 'Customer':
                 $this->menu = array(array('label' => Yii::t('site', 'My orders'), 'url' => array('/project/zakaz/customerOrderList')), array('label' => Yii::t('site', 'Create order'), 'url' => array('/project/zakaz/create')), array('label' => Yii::t('site', 'Profile'), 'url' => array('/user/profile/edit')), array('label' => Yii::t('site', 'Logout'), 'url' => array('/user/logout')));
                 $this->authMenu = array(array('label' => Yii::t('site', 'Logout'), 'url' => array('/user/logout')));
                 Yii::app()->theme = 'client';
                 break;
         }
     }
     //		var_dump(Yii::app()->controller->module->id ,Yii::app()->controller->id, Yii::app()->controller->action->id);
     //		die();
 }
開發者ID:kibercoder,項目名稱:dipstart-development,代碼行數:46,代碼來源:Controller.php


注:本文中的Campaign::getLanguage方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。