protected function execScaffoldDelete($prm = null) { $id = $prm[0]; $this->row = $this->table->find($id); $this->hook('delete'); $this->hook('beforeDelete'); if ($this->row) $this->row->delete(); $this->hook('afterDelete'); response::getInstance()->redirect($this->indexPage); }
/** * Save the connection on the parametred cookie */ public function saveCookieStayConnected() { $cook = factory::get('http_cookie', $this->cfg->cookie); $cook->set($this->user->get($this->cfg->getInArray('fields', 'cryptic'))); $cook->save(); }
/** * Add a row with a db_row or an array * * @param db_row|array $row The row to add */ public function add($row) { if ($row instanceof db_row) { $this->_rows[$this->_count] = $row; $array = $row->getData(); } else { $array = $row; } $this->cfg->setInArray('data', $this->_count, $array); $this->_count++; }