get_model_class_name(); $object_instance = new $model_class_name($this->id, $this->id_pclass); if(method_exists($model_class_name, 'set_controller')) { $model_class_name::set_controller($this); } return $object_instance; } public function set_id_pclass($id_pclass=0) { $this->id_pclass = (int) $id_pclass; } public function proceed() { global $sub, $action; global $id_pclass; switch($sub) { case 'pclass': if($action == 'add') { $id_pclass = 0; } configuration_controller::set_model_class_name('pclassement'); configuration_controller::set_list_ui_class_name('list_configuration_indexint_pclass_ui'); configuration_controller::proceed($id_pclass); break; default: parent::proceed(); break; } } public function proceed_replace() { global $msg; global $n_indexint_id, $aut_link_save; $object_instance = $this->get_object_instance(); if(!$n_indexint_id) { $object_instance->replace_form(); }else { // routine de remplacement $rep_result = $object_instance->replace($n_indexint_id,$aut_link_save); if(!$rep_result) { print $this->get_display_list(); }else { error_message($msg[132], $rep_result, 1, $this->get_edit_link()); } } } public function proceed_update() { global $msg; global $indexint_nom, $indexint_comment, $indexint_pclassement; global $authority_statut, $authority_thumbnail_url; // mettre à jour $object_instance = $this->get_object_instance(); $updated = $object_instance->update($indexint_nom, $indexint_comment, $indexint_pclassement, $authority_statut, $authority_thumbnail_url); if($object_instance->get_cp_error_message()){ error_message($msg['indexint_create'], $object_instance->get_cp_error_message(), 1, $this->get_edit_link()); }elseif($updated) { return $object_instance->indexint_id; } return 0; } public function get_searcher_instance() { global $exact; $exact += 0; $indexint_searcher = searcher_factory::get_searcher('indexint', '', $this->user_input); $fields_restrict = array(); if (!$exact) { $fields_restrict[]= array( 'field' => "code_champ", 'values' => array(8002), 'op' => "and", 'not' => false ); } else { $fields_restrict[]= array( 'field' => "code_champ", 'values' => array(8001), 'op' => "and", 'not' => false ); } $indexint_searcher->add_fields_restrict($fields_restrict); return $indexint_searcher; } protected function search_form() { global $id_pclass; $id_pclass = intval($id_pclass); $model_class_name = $this->get_model_class_name(); $model_class_name::search_form($id_pclass); } protected function get_pagination_link() { global $thesaurus_classement_mode_pmb; global $thesaurus_classement_defaut; global $id_pclass; global $exact; $link = parent::get_pagination_link(); if ($thesaurus_classement_mode_pmb != 0) { if($id_pclass!=0) { $link .= "&id_pclass=$id_pclass"; } } else { $link .= "&id_pclass=$thesaurus_classement_defaut"; } $link .= "&exact=".$exact; return $link; } protected function get_display_header_list() { global $msg; $display = "