示例#1
0
 public function add($dataPost)
 {
     $entry = new EntryEntity();
     $form = $this->getEntryForm();
     $form->setData($dataPost);
     if ($form->isValid()) {
         $entry->exchangeArray($form->getData());
         $this->getEntryTable()->add($entry);
         return true;
     }
     return false;
 }
示例#2
0
 public function add(Entry $entry)
 {
     $data = array('name' => $entry->getName(), 'email' => $entry->getEmail(), 'website' => $entry->getWebsite(), 'message' => $entry->getMessage());
     $this->insert($data);
 }