PHP Класс Mgallegos\LaravelJqgrid\Repositories\EloquentRepositoryAbstract

Наследование: implements Mgallegos\LaravelJqgrid\Repositories\RepositoryInterface
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$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