objects_type)) { $this->objects_type = str_replace('list_', '', get_class($this)).'_'.static::$type; } parent::__construct($filters, $pager, $applied_sort); } protected function _get_query_base() { $query = 'SELECT id_classement FROM classements '; return $query; } protected function get_object_instance($row) { return new classement($row->id_classement); } protected function _get_query_order() { if ($this->applied_sort[0]['by']) { $order = ''; $sort_by = $this->applied_sort[0]['by']; switch($sort_by) { case 'order': $order .= 'classement_order, nom_classement'; break; default : $order .= parent::_get_query_order(); break; } if($order) { return $this->_get_query_order_sql_build($order); } else { return ""; } } } /** * Initialisation du tri par défaut appliqué */ protected function init_default_applied_sort() { $this->add_applied_sort('order'); } /** * Initialisation des colonnes disponibles */ protected function init_available_columns() { $this->available_columns = array('main_fields' => array( 'order' => '', 'nom_classement' => '103', 'nom_classement_opac' => 'dsi_clas_form_nom_opac', ) ); $this->available_columns['custom_fields'] = array(); } protected function init_default_columns() { $this->add_column('order'); $this->add_column('nom_classement'); $this->add_column('nom_classement_opac'); } protected function init_default_settings() { parent::init_default_settings(); $this->set_setting_display('search_form', 'visible', false); $this->set_setting_display('search_form', 'export_icons', false); } protected function get_button_add() { global $msg; return ""; } /** * Filtre SQL */ protected function _get_query_filters() { $filter_query = ''; $this->set_filters_from_form(); $filters = array(); if(static::$type == 'EQU') { $filters [] = "(type_classement='EQU')"; } elseif(static::$type !== '') { $filters [] = "(type_classement='' or type_classement='".static::$type."')"; } if(count($filters)) { $filter_query .= ' where '.implode(' and ', $filters); } return $filter_query; } protected function _get_query_human() { global $msg, $charset; return "