Example #1
0
	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);
	}
Example #2
0
	/**
	 * 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();
	}
Example #3
0
 /**
  * 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++;
 }