Example #1
0
 /**
  * To edit or update a site.
  * @return Site Returns this for chaining.
  */
 public function actionEdit()
 {
     isset($_POST['data']) ? $data = $_POST['data'] : ($data = false);
     //files
     if (isset($_FILES['files'])) {
         $data['files'] = parent::parseUpload($_FILES['files']);
     }
     // update/create site
     if ($data) {
         $this->data = $this->update($data);
     }
     return $this;
 }