コード例 #1
0
 /**
  * Manages all models.
  */
 public function actionManage()
 {
     $setting = OmmuSettings::model()->findByPk(1);
     $model = new OmmuLanguages('search');
     $model->unsetAttributes();
     // clear any default values
     if (isset($_GET['OmmuLanguages'])) {
         $model->attributes = $_GET['OmmuLanguages'];
     }
     $columnTemp = array();
     if (isset($_GET['GridColumn'])) {
         foreach ($_GET['GridColumn'] as $key => $val) {
             if ($_GET['GridColumn'][$key] == 1) {
                 $columnTemp[] = $key;
             }
         }
     }
     $columns = $model->getGridColumn($columnTemp);
     $this->pageTitle = Yii::t('phrase', 'Language Settings');
     $this->pageDescription = Yii::t('phrase', 'The layout of your social network includes hundreds of phrases of text which are stored in a language pack. SocialEngine comes with an English pack which is the default when you first install the platform. If you want to change any of these phrases on your social network, you can edit the pack below. If you want to allow users to pick from multiple languages, you can also create additional packs below. If you have multiple language packs, the pack you\'ve selected as your "default" will be the language that displays if a user has not selected any other language. Note: You can not delete the default language. To edit a language\'s details, click its name.');
     $this->pageMeta = '';
     $this->render('admin_manage', array('model' => $model, 'columns' => $columns, 'setting' => $setting));
 }