num_contact_form = intval($num_contact_form); $this->fetch_data(); } /** * Données */ protected function fetch_data() { $this->objects = array(); $query = 'select id_object from contact_form_objects where num_contact_form = '.$this->num_contact_form.' order by object_label'; $result = pmb_mysql_query($query); if (pmb_mysql_num_rows($result)) { while($row = pmb_mysql_fetch_object($result)) { $this->objects[] = new contact_form_object($row->id_object); } } } /** * Sélecteur d'objets de mail */ public function gen_selector() { $selector = ""; return $selector; } public static function delete($num_contact_form=0) { $num_contact_form = intval($num_contact_form); if (!isset($num_contact_form)) { return; } $query = "delete from contact_form_objects where num_contact_form = ".$num_contact_form; pmb_mysql_query($query); return true; } public function get_objects() { return $this->objects; } }