PHP 클래스 Mgallegos\LaravelJqgrid\Repositories\EloquentRepositoryAbstract

상속: implements Mgallegos\LaravelJqgrid\Repositories\RepositoryInterface
파일 보기 프로젝트 열기: mgallegos/laravel-jqgrid

보호된 프로퍼티들

프로퍼티 타입 설명
$Database Database
$leafColumn String Leaf Column Name (TreeGrid Property)
$orderBy array OrderBy
$parentColumn String Parent Column Name (TreeGrid Property)
$treeGrid boolean Tree Grid Flag
$visibleColumns Array Visible columns

공개 메소드들

메소드 설명
getRows ( integer $limit, integer $offset, string $orderBy = null, string $sord = null, array $filters = [], string $nodeId = null, string $nodeLevel = null, boolean $exporting ) : array Get the rows data to be shown in the grid.
getTotalNumberOfRows ( array $filters = [] ) : integer Calculate the number of rows. It's used for paging the result.

메소드 상세

getRows() 공개 메소드

Get the rows data to be shown in the grid.
public getRows ( integer $limit, integer $offset, string $orderBy = null, string $sord = null, array $filters = [], string $nodeId = null, string $nodeLevel = null, boolean $exporting ) : array
$limit integer Number of rows to be shown into the grid
$offset integer Start position
$orderBy string Column name to order by.
$sord string Sorting order
$filters array An array of filters, example: array(array('field'=>'column index/name 1','op'=>'operator','data'=>'searched string column 1'), array('field'=>'column index/name 2','op'=>'operator','data'=>'searched string column 2')) The 'field' key will contain the 'index' column property if is set, otherwise the 'name' column property. The 'op' key will contain one of the following operators: '=', '<', '>', '<=', '>=', '<>', '!=','like', 'not like', 'is in', 'is not in'. when the 'operator' is 'like' the 'data' already contains the '%' character in the appropiate position. The 'data' key will contain the string searched by the user.
$nodeId string Node id (used only when the treeGrid option is set to true)
$nodeLevel string Node level (used only when the treeGrid option is set to true)
$exporting boolean Flag that determines if the data will be exported (used only when the treeGrid option is set to true)
리턴 array An array of array, each array will have the data of a row. Example: array(array("column1" => "1-1", "column2" => "1-2"), array("column1" => "2-1", "column2" => "2-2"))

getTotalNumberOfRows() 공개 메소드

Calculate the number of rows. It's used for paging the result.
public getTotalNumberOfRows ( array $filters = [] ) : integer
$filters array An array of filters, example: array(array('field'=>'column index/name 1','op'=>'operator','data'=>'searched string column 1'), array('field'=>'column index/name 2','op'=>'operator','data'=>'searched string column 2')) The 'field' key will contain the 'index' column property if is set, otherwise the 'name' column property. The 'op' key will contain one of the following operators: '=', '<', '>', '<=', '>=', '<>', '!=','like', 'not like', 'is in', 'is not in'. when the 'operator' is 'like' the 'data' already contains the '%' character in the appropiate position. The 'data' key will contain the string searched by the user.
리턴 integer Total number of rows

프로퍼티 상세

$Database 보호되어 있는 프로퍼티

Database
protected $Database

$leafColumn 보호되어 있는 프로퍼티

Leaf Column Name (TreeGrid Property)
protected String $leafColumn
리턴 String

$orderBy 보호되어 있는 프로퍼티

OrderBy
protected array $orderBy
리턴 array

$parentColumn 보호되어 있는 프로퍼티

Parent Column Name (TreeGrid Property)
protected String $parentColumn
리턴 String

$treeGrid 보호되어 있는 프로퍼티

Tree Grid Flag
protected bool $treeGrid
리턴 boolean

$visibleColumns 보호되어 있는 프로퍼티

Visible columns
protected Array $visibleColumns
리턴 Array