PHP Class Msieprawski\ResourceTable\ResourceTable

Datei anzeigen Open project: msieprawski/resource-table Class Usage Examples

Public Methods

Method Description
collection ( ) : Collection Returns "last set" Collection object after calling ResourceTable::of
getSearchValue ( string $name ) : mixed Returns search form default value
of ( Builder | Builder $builder ) : Collection Sets builder and returns collection
setCustomView ( string $customView ) Set custom view name if you've created your own ResourceTable template
setFilter ( boolean $filter ) Set true if you wan to enable filter
setPage ( integer $page ) Current page
setPaginate ( boolean $paginate ) Set false if you dont want to use pagination
setPaginationPresenter ( string $presenter ) Set pagination presenter class name
setPerPage ( integer $perPage ) How many results per page
setRendererNamespace ( string $namespace ) Set renderers default namespace to prevent long renderers names
setView ( string $view ) Set ResourceTable built-in view name
validColumnType ( string $type ) : boolean Returns array with valid column type options

Private Methods

Method Description
_addCustomAttributes ( Collection $collection ) : Collection Sets custom configuration (if set) on given Collection

Method Details

collection() public static method

Returns "last set" Collection object after calling ResourceTable::of
public static collection ( ) : Collection
return Msieprawski\ResourceTable\Generators\Collection

getSearchValue() public static method

Returns search form default value
public static getSearchValue ( string $name ) : mixed
$name string
return mixed

of() public static method

Sets builder and returns collection
public static of ( Builder | Builder $builder ) : Collection
$builder Illuminate\Database\Eloquent\Builder | Illuminate\Database\Query\Builder
return Msieprawski\ResourceTable\Generators\Collection

setCustomView() public static method

Set custom view name if you've created your own ResourceTable template
public static setCustomView ( string $customView )
$customView string

setFilter() public static method

Set true if you wan to enable filter
public static setFilter ( boolean $filter )
$filter boolean

setPage() public static method

Current page
public static setPage ( integer $page )
$page integer

setPaginate() public static method

Set false if you dont want to use pagination
public static setPaginate ( boolean $paginate )
$paginate boolean

setPaginationPresenter() public static method

Set pagination presenter class name
public static setPaginationPresenter ( string $presenter )
$presenter string

setPerPage() public static method

How many results per page
public static setPerPage ( integer $perPage )
$perPage integer

setRendererNamespace() public static method

Set renderers default namespace to prevent long renderers names
public static setRendererNamespace ( string $namespace )
$namespace string

setView() public static method

Set ResourceTable built-in view name
public static setView ( string $view )
$view string

validColumnType() public static method

Returns array with valid column type options
public static validColumnType ( string $type ) : boolean
$type string
return boolean