Exemple #1
0
 private function saveHeader($domain, $title, $charset, $keywords, $description, $icon, $lang)
 {
     $model = new Header();
     $model->domain = $domain;
     $model->title = $title;
     $model->charset = $charset;
     $model->keywords = $keywords;
     $model->description = $description;
     $model->icon = $icon;
     $model->lang = $lang;
     $model->save(false);
 }
Exemple #2
0
 /**
  * Creates a new model.
  * If creation is successful, the browser will be redirected to the 'view' page.
  */
 public function actionCreate()
 {
     $model = new Header();
     // Uncomment the following line if AJAX validation is needed
     // $this->performAjaxValidation($model);
     if (isset($_POST['Header'])) {
         $model->attributes = $_POST['Header'];
         if ($model->save()) {
             $this->redirect(array('view', 'id' => $model->id));
         }
     }
     $this->render('create', array('model' => $model));
 }