Example #1
0
 /**
  * Inserts or updates privacy model.
  *
  * @param PrivacyModel $privacy
  */
 public function save(PrivacyModel $privacy)
 {
     $fields = array('title' => $privacy->getTitle(), 'urltitle' => $privacy->getUrlTitle(), 'url' => $privacy->getUrl(), 'text' => $privacy->getText(), 'show' => $privacy->getShow());
     if ($privacy->getId()) {
         $this->db()->update('privacy')->values($fields)->where(array('id' => $privacy->getId()))->execute();
     } else {
         $this->db()->insert('privacy')->values($fields)->execute();
     }
 }