Permalink
Browse files

added mData support for datatables

  • Loading branch information...
1 parent 21e1efd commit edd0086c67b1fb13e29b7a544c097f2fcf6ad372 @bllim committed Jun 5, 2013
Showing with 12 additions and 6 deletions.
  1. +12 −6 Datatables.php
View
@@ -48,8 +48,9 @@ public static function of($query)
* @return null
*/
- public function make()
+ public function make($mDataSupport=false)
@gadelkareem
gadelkareem Sep 5, 2014

What doe mDataSuppot do?

{
+ $this->mDataSupport = $mDataSupport;
$this->create_last_columns();
$this->init();
$this->get_result();
@@ -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);
+ }
}
}

0 comments on commit edd0086

Please sign in to comment.