PHP Класс OpenSkill\Datatable\Composers\ColumnComposer

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( OpenSkill\Datatable\Providers\Provider $provider, VersionEngine $versionEngine, Illuminate\Contracts\View\Factory $viewFactory, Illuminate\Contracts\Config\Repository $configRepository ) Will create a new datatable composer instance with the given provider
add ( OpenSkill\Datatable\Columns\ColumnConfiguration $configuration ) This method will add the given ColumnConfiguration to the composer.
build ( ) : DatatableService
column ( string $name, string | callable $callable = null, Searchable $searchable = null, OpenSkill\Datatable\Columns\Orderable\Orderable $orderable = null ) Will create a new ColumnConfiguration with all defaults but allows overriding of all properties through the method.
getColumnConfiguration ( ) : OpenSkill\Datatable\Columns\ColumnConfiguration[] Will return the internal column configurations that are registered with the current composer.
getProvider ( ) : OpenSkill\Datatable\Providers\Provider Will return the Provider for the underlying data.

Приватные методы

Метод Описание
setCallableColumn ( $config, $callable ) Determine a sane configuration value for a column's callable function

Описание методов

__construct() публичный Метод

Will create a new datatable composer instance with the given provider
public __construct ( OpenSkill\Datatable\Providers\Provider $provider, VersionEngine $versionEngine, Illuminate\Contracts\View\Factory $viewFactory, Illuminate\Contracts\Config\Repository $configRepository )
$provider OpenSkill\Datatable\Providers\Provider the provider that will process the underlying data
$versionEngine OpenSkill\Datatable\Versions\VersionEngine The version engine to handle the request data
$viewFactory Illuminate\Contracts\View\Factory The factory providing the views
$configRepository Illuminate\Contracts\Config\Repository The repository providing the user defined options

add() публичный Метод

This method will add the given ColumnConfiguration to the composer.
public add ( OpenSkill\Datatable\Columns\ColumnConfiguration $configuration )
$configuration OpenSkill\Datatable\Columns\ColumnConfiguration the configuration to add to the composer

build() публичный Метод

public build ( ) : DatatableService
Результат OpenSkill\Datatable\DatatableService Will return the fully built DatatableService that will contain the ColumnConfiguration

column() публичный Метод

Will create a new ColumnConfiguration with all defaults but allows overriding of all properties through the method.
public column ( string $name, string | callable $callable = null, Searchable $searchable = null, OpenSkill\Datatable\Columns\Orderable\Orderable $orderable = null )
$name string The name of the configuration, required for the configuration
$callable string | callable The function to execute, defaults to null which means the default will be set.
$searchable OpenSkill\Datatable\Columns\Searchable\Searchable If the column should be searchable or not
$orderable OpenSkill\Datatable\Columns\Orderable\Orderable If the column should be orderable or not

getColumnConfiguration() публичный Метод

Will return the internal column configurations that are registered with the current composer.
public getColumnConfiguration ( ) : OpenSkill\Datatable\Columns\ColumnConfiguration[]
Результат OpenSkill\Datatable\Columns\ColumnConfiguration[]

getProvider() публичный Метод

Will return the Provider for the underlying data.
public getProvider ( ) : OpenSkill\Datatable\Providers\Provider
Результат OpenSkill\Datatable\Providers\Provider