Skip to content

Commit

Permalink
Add setOrder method
Browse files Browse the repository at this point in the history
  • Loading branch information
atkrad committed Nov 17, 2014
1 parent ba542da commit c30540c
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Table.php
Original file line number Diff line number Diff line change
Expand Up @@ -564,4 +564,21 @@ public function setPageLength($pageLength)

return $this;
}

/**
* If ordering is enabled (orderingDT), then DataTables will perform a first pass order during
* initialisation. Using this parameter you can define which column(s) the order is performed
* upon, and the ordering direction.
*
* @param array $order Initial order (sort) to apply to the table
*
* @return Table
* @see http://datatables.net/reference/option/order
*/
public function setOrder(array $order)
{
$this->properties['order'] = $order;

return $this;
}
}

0 comments on commit c30540c

Please sign in to comment.