Method | Description | |
---|---|---|
__construct ( |
CollectionProvider constructor. | |
order ( callable $orderFunction ) | Will accept a global search function for all columns. | |
prepareForProcessing ( OpenSkill\Datatable\Queries\QueryConfiguration $queryConfiguration, array $columnConfiguration ) : mixed | Here the DTQueryConfiguration is passed to prepare the provider for the processing of the request. | |
process ( ) : |
This method should process all configurations and prepare the underlying data for the view. It will arrange the data and provide the results in a DTData object. | |
search ( callable $searchFunction ) | Will accept a global search function for all columns. | |
searchColumn ( string $columnName, callable $searchFunction ) | Will accept a search function that should be called for the column with the given name. | |
setupOrder ( ) | ||
setupSearch ( ) |
Method | Description | |
---|---|---|
compileCollection ( array $columnConfiguration ) | Will compile the collection into the final collection where operations like search and order can be applied. | |
removeEmptyRowsFromCollection ( ) | Remove the empty rows from the collection | |
sortCollection ( ) | Will sort the internal collection based on the given query configuration. | |
transformCollectionData ( OpenSkill\Datatable\Columns\ColumnConfiguration[] $columnConfiguration, $searchFunc ) | Transform collection data. Used for searches. |
public __construct ( |
||
$collection | The collection with the initial data |
public prepareForProcessing ( OpenSkill\Datatable\Queries\QueryConfiguration $queryConfiguration, array $columnConfiguration ) : mixed | ||
$queryConfiguration | OpenSkill\Datatable\Queries\QueryConfiguration | |
$columnConfiguration | array | |
return | mixed |
public process ( ) : |
||
return | The processed data |
public searchColumn ( string $columnName, callable $searchFunction ) | ||
$columnName | string | the name of the column to pass this function to |
$searchFunction | callable | the function for the searching |