Table = $table[0]; $this->add_object($row); } } } protected function fetch_data() { $this->objects = array(); $this->_init_tables(); $this->messages = ""; } protected function init_available_filters() { $this->available_filters = array('main_fields' => array( ) ); $this->available_filters['custom_fields'] = array(); } public function init_filters($filters=array()) { $this->filters = array( ); parent::init_filters($filters); } public function init_applied_group($applied_group=array()) { $this->applied_group = array(0 => 'Table'); } 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); $this->set_setting_display('query', 'human', false); $this->set_setting_column('default', 'align', 'left'); $this->settings['objects']['default']['display_mode'] = 'expandable_table'; $this->settings['grouped_objects']['default']['sort'] = 0; $this->settings['grouped_objects']['level_1']['display_mode'] = 'expandable_table'; } protected function init_no_sortable_columns() { $this->no_sortable_columns = array( 'Field', 'Type', 'Null', 'Key', 'Default', 'Extra' ); } protected function init_default_pager() { parent::init_default_pager(); $this->pager['nb_per_page'] = 250; $this->pager['nb_per_page_on_group'] = true; } /** * Initialisation des colonnes disponibles */ protected function init_available_columns() { $this->available_columns = array('main_fields' => array( 'Field' => 'Field', 'Type' => 'Type', 'Null' => 'Null', 'Key' => 'Key', 'Default' => 'Default', 'Extra' => 'Extra', ) ); $this->available_columns['custom_fields'] = array(); } protected function init_default_columns() { $this->add_column('Field'); $this->add_column('Type'); $this->add_column('Null'); $this->add_column('Key'); $this->add_column('Default'); $this->add_column('Extra'); } /** * Construction dynamique de la fonction JS de tri */ protected function get_js_sort_script_sort() { global $sub; $display = parent::get_js_sort_script_sort(); $display = str_replace('!!categ!!', 'misc', $display); $display = str_replace('!!sub!!', $sub, $display); $display = str_replace('!!action!!', 'list', $display); return $display; } protected function get_cell_content($object, $property) { $content = ''; switch($property) { // case 'label': // $content .= $object->libproc_classement; // break; default : $content .= parent::get_cell_content($object, $property); break; } return $content; } }