table_name) { case 'bannettes': if($this->bannette_type == 'abo') { return $this->get_url_base()."&suite=acces&id_empr=".$this->id_empr; } else { if($this->object_id) { return $this->get_url_base()."&suite=search"; } } default: return parent::get_cancel_action(); } } protected function get_display_cancel_action() { switch ($this->table_name) { case 'bannettes': if($this->bannette_type == 'abo') { return parent::get_display_cancel_action(); } else { if($this->object_id) { return parent::get_display_cancel_action(); } else { return ""; } } break; default: return parent::get_display_cancel_action(); break; } } protected function get_submit_action() { switch ($this->table_name) { case 'bannettes': return $this->get_url_base()."&suite=update&id_bannette=".$this->object_id; case 'equations': return $this->get_url_base()."&suite=update&id_equation=".$this->object_id; case 'classements': return $this->get_url_base()."&suite=update&id_classement=".$this->object_id; case 'rss_flux': return $this->get_url_base()."&suite=update&id_rss_flux=".$this->object_id; default: return $this->get_url_base()."&suite=update&id=".$this->object_id; } } protected function get_duplicate_action() { switch ($this->table_name) { case 'bannettes': return $this->get_url_base()."&suite=duplicate&id_bannette=".$this->object_id; case 'equations': return $this->get_url_base()."&suite=duplicate&id_equation=".$this->object_id; case 'classements': return $this->get_url_base()."&suite=duplicate&id_classement=".$this->object_id; case 'rss_flux': return $this->get_url_base()."&suite=duplicate&id_rss_flux=".$this->object_id; default: return $this->get_url_base()."&suite=duplicate&id=".$this->object_id; } } protected function get_delete_action() { switch ($this->table_name) { case 'bannettes': return $this->get_url_base()."&suite=delete&id_bannette=".$this->object_id; case 'equations ': return $this->get_url_base()."&suite=delete&id_equation=".$this->object_id; case 'classements': return $this->get_url_base()."&suite=delete&id_classement=".$this->object_id; case 'rss_flux': return $this->get_url_base()."&suite=delete&id_rss_flux=".$this->object_id; default: return $this->get_url_base()."&suite=delete&id=".$this->object_id; } } public function set_bannette_type($bannette_type) { $this->bannette_type = $bannette_type; return $this; } public function set_id_empr($id_empr) { $this->id_empr = intval($id_empr); return $this; } }