コード例 #1
0
ファイル: SaveCommand.php プロジェクト: nojdug/domain
 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);
 }
コード例 #2
0
ファイル: HeaderController.php プロジェクト: nojdug/domain
 /**
  * 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));
 }