Skip to content

Commit

Permalink
added mData support for datatables
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilal committed Jun 5, 2013
1 parent 21e1efd commit edd0086
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions Datatables.php
Expand Up @@ -48,8 +48,9 @@ public static function of($query)
* @return null
*/

public function make()
public function make($mDataSupport=false)

This comment has been minimized.

Copy link
@gadelkareem

gadelkareem Sep 5, 2014

What doe mDataSuppot do?

{
$this->mDataSupport = $mDataSupport;
$this->create_last_columns();
$this->init();
$this->get_result();
Expand Down Expand Up @@ -192,12 +193,17 @@ private function init_columns()

private function regulate_array()
{
foreach ($this->result_array as $key => $value) {
foreach ($this->excess_columns as $evalue) {
unset($value[$evalue]);
}

$this->result_array_r[] = array_values($value);
if($this->mDataSupport){
$this->result_array_r = $this->result_array;
}else{
foreach ($this->result_array as $key => $value) {
foreach ($this->excess_columns as $evalue) {
unset($value[$evalue]);
}

$this->result_array_r[] = array_values($value);
}
}
}

Expand Down

0 comments on commit edd0086

Please sign in to comment.