CI_Table::_default_template PHP Method

_default_template() protected method

Default Template
protected _default_template ( ) : array
return array
    protected function _default_template()
    {
        return array('table_open' => '<table border="0" cellpadding="4" cellspacing="0">', 'thead_open' => '<thead>', 'thead_close' => '</thead>', 'heading_row_start' => '<tr>', 'heading_row_end' => '</tr>', 'heading_cell_start' => '<th>', 'heading_cell_end' => '</th>', 'tbody_open' => '<tbody>', 'tbody_close' => '</tbody>', 'row_start' => '<tr>', 'row_end' => '</tr>', 'cell_start' => '<td>', 'cell_end' => '</td>', 'row_alt_start' => '<tr>', 'row_alt_end' => '</tr>', 'cell_alt_start' => '<td>', 'cell_alt_end' => '</td>', 'table_close' => '</table>');
    }

Usage Example

Example #1
0
 function _default_template()
 {
     $default_template = parent::_default_template();
     $default_template['table_open'] = '<table';
     foreach ($this->attributes as $attr => $value) {
         $default_template['table_open'] .= " {$attr}=\"{$value}\"";
     }
     $default_template['table_open'] .= '>';
     $default_template['row_alt_start'] = '<tr class="oddLine">';
     return $default_template;
 }