public function deleteAction() { if ($this->request->isPost()) { $element = Mediacontacts::findFirstByUid($this->request->getPost('uid')); $element->deleted = 1; $element->save(); } }
public function indexAction() { $currentyear = $this->littlehelpers->getCurrentYear(); $projects = Mediacontacts::find(array('conditions' => 'deleted=0 AND hidden=0 AND usergroup = ?1 AND tstamp >= ?2 AND tstamp <= ?3', 'bind' => array(1 => $this->session->get('auth')['usergroup'], 2 => $currentyear[0], 3 => $currentyear[1]), 'order' => 'starttime DESC')); $this->view->setVar('projects', $projects); }