PHP 클래스 OpenSkill\Datatable\Providers\QueryBuilderProvider

상속: implements OpenSkill\Datatable\Providers\Provider
파일 보기 프로젝트 열기: openskill/datatable 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Builder $query ) CollectionProvider constructor.
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 ( ) : ResponseData 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.

비공개 메소드들

메소드 설명
compileColumnNames ( ) Get a list of all the column names for the SELECT query.
compileColumnQuery ( ) : Builder When a global query is being performed (ie, a query against a single column)
compileGlobalQuery ( ) : Builder When a global (single) search has been done against data in the datatable.
compileQuery ( ) : Builder Will compile the collection into the final collection where operations like search and order can be applied.
createQueryForColumn ( OpenSkill\Datatable\Columns\ColumnConfiguration $column, $searchValue ) : Builder Create the query w/ QueryBuilder
getColumnFromName ( string $name ) : OpenSkill\Datatable\Columns\ColumnConfiguration Get the requested column configuration from the name of a column
getTotalNumberOfRows ( ) : integer Get the total number of rows for the original query.
limitQuery ( ) Will limit a query based on the start and length given
sortQuery ( ) Will sort the query based on the given datatable query configuration.

메소드 상세

__construct() 공개 메소드

CollectionProvider constructor.
public __construct ( Builder $query )
$query Illuminate\Database\Query\Builder The query to base the built query on

prepareForProcessing() 공개 메소드

This will only be called when the DTProvider needs to handle the request. It will never be called when the DTProvider does not need to handle the request.
public prepareForProcessing ( OpenSkill\Datatable\Queries\QueryConfiguration $queryConfiguration, array $columnConfiguration ) : mixed
$queryConfiguration OpenSkill\Datatable\Queries\QueryConfiguration
$columnConfiguration array
리턴 mixed

process() 공개 메소드

It will be called after {@link #prepareForProcessing} has been called and needs to return the processed data in a DTData object so the Composer can further handle the data.
public process ( ) : ResponseData
리턴 OpenSkill\Datatable\Data\ResponseData The processed data