class ColumnFactory (View source)

ColumnFactory Class

The ColumnFactory creates new columns for DataTables. The only mandatory parameter is the type of column to create, all others are optional.

Properties

static array $TYPES Valid column types
static array $ROLES Valid column roles
static array $desc Valid column descriptions

Methods

static  Column
create( string $type, string $label = '', Format $format = null, string $role = '')

Creates a new column object.

static  Column
applyFormat( Column $column, Format $format)

Creates a new Column with the same values, while applying the Format.

Details

at line 84
static Column create( string $type, string $label = '', Format $format = null, string $role = '')

Creates a new column object.

Parameters

string $type Type of column to create.
string $label A label for the column.
Format $format Column formatter for the data.
string $role A role for the column to play.

Return Value

Column

Exceptions

InvalidColumnRole
InvalidColumnType

at line 122
static Column applyFormat( Column $column, Format $format)

Creates a new Column with the same values, while applying the Format.

Parameters

Column $column
Format $format

Return Value

Column