AjaxDataTableTrait
trait AjaxDataTableTrait
Trait AjaxDataTable.
This trait class externalize the work for AJAX DataTable.
Methods
Return the table data using AJAX
Initialize common properties
Realize the search to database table.
Return a default list of col.
Fill 'col-action' fields with action buttons.
Returns a list of actions buttons. By default returns Read/Update/Delete actions.
Send the Response with data received.
Returns the header for table.
Returns the content for the body of table.
Returns a list of fields for the tablename.
Returns a footer list of fields for the table.
Details
at line 25
ajaxTableDataMethod()
Return the table data using AJAX
at line 55
abstract
initialize()
Initialize common properties
at line 64
private
searchData(array $data, int $recordsFiltered, array $requestData = [])
Realize the search to database table.
at line 99
array
getDefaultColumnsSearch()
Return a default list of col.
at line 116
private
fillActions($data)
Fill 'col-action' fields with action buttons.
at line 145
abstract array
getActionButtons(string $id = '')
Returns a list of actions buttons. By default returns Read/Update/Delete actions.
If some needs to be replace, replace it on final class.
at line 155
abstract Response
sendResponse(string $reply, int $status = Response::HTTP_OK)
Send the Response with data received.
at line 160
getTableHeader()
Returns the header for table.
at line 183
getTableBody()
Returns the content for the body of table.
at line 208
getListFields()
Returns a list of fields for the tablename.
at line 239
getTableFooter()
Returns a footer list of fields for the table.