id=$id*1; $this->record_child = new nomenclature_record_child($this->id); } // end of member function __construct public function get_form(){ $data= encoding_normalize::json_encode($this->record_child->get_data()); $div .= "
"; return $div; } public function save_form(){ if(!$this->id)return; // pas id de notice $this->record_child->save_form(); } public function delete(){ $this->record_child->delete(); } public function get_isbd(){ global $dbh,$msg; $isbd=""; $data=$this->record_child->get_data(); $type_display=""; if($data["type_name"])$type_display.=" / ".$data["type_name"]; if($data["formation_label"])$type_display.=" / ".$data["formation_label"]; if(!$data["nature"]){ // Instrument $isbd.=" ".$msg["nomenclature_isbd_child_formation"]." : ".$data["formation_name"].$type_display."
".$msg["nomenclature_isbd_child_musicstand"]." : ".$data["musicstand_name"]."
".$msg["nomenclature_isbd_child_instrument"]." : ".$data["instrument_name"]."
"; if($data["other"]) { $other_instruments = explode('/', $data["other"]); $other_instruments_name = array(); foreach ($other_instruments as $other_instrument) { $instrument_name = nomenclature_instrument::get_instrument_name_from_code($other_instrument); if($instrument_name) { $other_instruments_name[] = $instrument_name; } } if(count($other_instruments_name)) { $isbd.=" ".$msg["nomenclature_isbd_child_other_instruments"]." : ".implode(' / ', $other_instruments_name)."
"; } } $isbd.=" ".$msg["nomenclature_isbd_child_effective"]." : " .$data["effective"]."
".$msg["nomenclature_isbd_child_order"]." : " .$data["order"]."
"; }else{ //Voix $isbd.=" ".$msg["nomenclature_isbd_child_formation"]." : ".$data["formation_name"].$type_display."
".$msg["nomenclature_isbd_child_voice"]." : ".$data["voice_name"]."
".$msg["nomenclature_isbd_child_effective"]." : " .$data["effective"]."
".$msg["nomenclature_isbd_child_order"]." : " .$data["order"]."
"; } return $isbd; } public static function get_index($id) { $record_child = new nomenclature_record_child($id); return $record_child->get_index(); } public function get_possible_values($num_parent){ return encoding_normalize::json_encode($this->record_child->get_possible_values($num_parent)); } } // end of nomenclature_record_child_ui