This action belper makes sorting table data that has an order field easier

Implement by adding the buttons returned by the direct method to the bottom of the table output. Create an action that calls the ajaxRequest method.

package Gems
subpackage Controller\Action
copyright Copyright (c) 2016 Erasmus MC
license New BSD License
since Class available since version 1.8.1

 Methods

Handles sort in an ajax request

ajaxAction(string $table, string $idField, string $orderField) : void

Parameters

$table

string

The table used

$idField

string

The name of the field with the primary key

$orderField

string

The name of the field that holds the order

Exceptions

\Gems_Exception

Get the sort buttons to add under the table with sortable rows

direct(string $sortAction = 'sort', string $urlIdParam = 'id') : \MUtil_Html_HtmlElement

Parameters

$sortAction

string

The name of the ajax action

$urlIdParam

string

The namr used to refer to the record ID in the url

Returns

\MUtil_Html_HtmlElement

Get the view

getView() : \Zend_View_Interface

Returns

\Zend_View_Interface