private function buildTable($table = array())
{
if (!empty($table) and isset($table['type'], $table['thead'], $table['rows'])) {
$this->CI->load->library('table');
$table_tag = $this->getTableTag($table);
$this->CI->table->set_template(array('table_open' => $table_tag[0], 'table_close' => $table_tag[1]));
$this->CI->table->set_heading($table['thead']);
$table_markup = $this->_styles['table_responsive'][0];
foreach ($table['rows'] as $row) {
$temp_row = $this->createTableRow($row);
$this->CI->table->add_row($temp_row);
}
$table_markup .= $this->CI->table->generate();
$table_markup .= $this->_styles['table_responsive'][1];
return $table_markup;
}
}