public function updateStatement()
 {
     $this->_statement->setTitle($this->_data['title']);
     $this->_statement->setText($this->_data['text']);
     $this->_statement->setCategory($this->_data['category']);
     $this->_statement->setType($this->_data['type']);
     $this->_statement->setAnswer($this->_data['answer']);
     $this->_statement->setStatus($this->_data['status']);
 }
Example #2
0
 public function getModel()
 {
     $model = new Statement();
     $model->setTitle($this->_data['title']);
     $model->setText($this->_data['text']);
     $model->setCategory($this->_data['category']);
     $model->setType($this->_data['type']);
     if ($this->_user->user_id) {
         $model->setUserId($this->_user->user_id);
         $model->setUsername($this->_user->name);
     } else {
         $model->setUserId(0);
         $model->setUsername($this->_data['name']);
         $model->setEmail($this->_data['email']);
     }
     return $model;
 }