This commit is contained in:
Manish Verma
2016-12-13 18:18:25 +05:30
parent fc98add11c
commit 2d8e640e9b
2314 changed files with 97798 additions and 75664 deletions

View File

@@ -0,0 +1,40 @@
<?php
namespace Yajra\Datatables\Contracts;
/**
* Interface DataTableButtonsContract.
*
* @package Yajra\Datatables\Contracts
* @author Arjay Angeles <aqangeles@gmail.com>
*/
interface DataTableButtonsContract
{
/**
* Export to excel file.
*
* @return mixed
*/
public function excel();
/**
* Export to CSV file.
*
* @return mixed
*/
public function csv();
/**
* Export to PDF file.
*
* @return mixed
*/
public function pdf();
/**
* Display printer friendly view.
*
* @return mixed
*/
public function printPreview();
}

View File

@@ -0,0 +1,47 @@
<?php
namespace Yajra\Datatables\Contracts;
/**
* Interface DataTableContract
*
* @package Yajra\Datatables\Contracts
* @author Arjay Angeles <aqangeles@gmail.com>
*/
interface DataTableContract
{
/**
* Render view.
*
* @param $view
* @param array $data
* @param array $mergeData
* @return \Illuminate\Http\JsonResponse|\Illuminate\View\View
*/
public function render($view, $data = [], $mergeData = []);
/**
* @return \Illuminate\Http\JsonResponse
*/
public function ajax();
/**
* @return \Yajra\Datatables\Html\Builder
*/
public function html();
/**
* @return \Yajra\Datatables\Html\Builder
*/
public function builder();
/**
* @return \Yajra\Datatables\Request
*/
public function request();
/**
* @return \Illuminate\Database\Eloquent\Builder|\Illuminate\Database\Query\Builder|\Illuminate\Support\Collection
*/
public function query();
}

View File

@@ -0,0 +1,80 @@
<?php
namespace Yajra\Datatables\Contracts;
/**
* Interface DataTableEngineContract
*
* @package Yajra\Datatables\Contracts
* @author Arjay Angeles <aqangeles@gmail.com>
*/
interface DataTableEngineContract
{
/**
* Get results.
*
* @return mixed
*/
public function results();
/**
* Count results.
*
* @return integer
*/
public function count();
/**
* Count total items.
*
* @return integer
*/
public function totalCount();
/**
* Set auto filter off and run your own filter.
* Overrides global search.
*
* @param \Closure $callback
* @param bool $globalSearch
* @return $this
*/
public function filter(\Closure $callback, $globalSearch = false);
/**
* Perform global search.
*
* @return void
*/
public function filtering();
/**
* Perform column search.
*
* @return void
*/
public function columnSearch();
/**
* Perform pagination.
*
* @return void
*/
public function paging();
/**
* Perform sorting of columns.
*
* @return void
*/
public function ordering();
/**
* Organizes works.
*
* @param bool $mDataSupport
* @param bool $orderFirst
* @return \Illuminate\Http\JsonResponse
*/
public function make($mDataSupport = false, $orderFirst = false);
}

View File

@@ -0,0 +1,20 @@
<?php
namespace Yajra\Datatables\Contracts;
/**
* Interface DataTableScopeContract.
*
* @package Yajra\Datatables\Contracts
* @author Arjay Angeles <aqangeles@gmail.com>
*/
interface DataTableScopeContract
{
/**
* Apply a query scope.
*
* @param \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $query
* @return mixed
*/
public function apply($query);
}