Methods

setPosition()

setPosition(integer  $position) : \Charcoal\Ui\Layout\LayoutInterface

Parameters

integer $position

The layout cell position.

Returns

\Charcoal\Ui\Layout\LayoutInterface

Chainable

position()

position() : integer

Returns

integer

setStructure()

setStructure(array  $layouts) : array

Prepare the layouts configuration in a simpler, ready, data structure.

This function goes through the layout options to expand loops into extra layout data...

Parameters

array $layouts

The original layout data, typically from configuration.

Returns

array —

Computed layouts, ready for looping

structure()

structure() : array

Returns

array

numRows()

numRows() : integer

Get the total number of rows

Returns

integer

rowIndex()

rowIndex(integer  $position = null) : integer|null

Get the row index at a certain position

Parameters

integer $position

Optional. Forced position.

Returns

integer|null

rowData()

rowData(integer  $position = null) : array|null

Get the row information

If no $position is specified, then the current position will be used.

Parameters

integer $position

Optional. Forced position.

Returns

array|null

rowNumColumns()

rowNumColumns(integer  $position = null) : integer|null

Get the number of columns (the colspan) of the row at a certain position

Parameters

integer $position

Optional. Forced position.

Returns

integer|null

rowNumCells()

rowNumCells(integer  $position = null) : integer

Get the number of cells at current position

This can be different than the number of columns, in case

Parameters

integer $position

Optional. Forced position.

Returns

integer

rowFirstCellIndex()

rowFirstCellIndex(integer  $position = null) : integer

Get the cell index (position) of the first cell of current row.

Parameters

integer $position

Optional. Forced position.

Returns

integer

cellRowIndex()

cellRowIndex(integer  $position = null) : integer

Get the cell index in the current row.

Parameters

integer $position

Optional. Forced position.

Returns

integer

numCellsTotal()

numCellsTotal() : integer

Get the total number of cells, in all rows.

Returns

integer

cellSpan()

cellSpan(integer  $position = null) : integer|null

Get the span number (in # of columns) of the current cell.

Parameters

integer $position

Optional. Forced position.

Returns

integer|null

cellSpanBy12()

cellSpanBy12(integer  $position = null) : integer

Get the span number as a part of 12 (for bootrap-style grids)

Parameters

integer $position

Optional. Forced position.

Returns

integer

cellStartsRow()

cellStartsRow(integer  $position = null) : boolean

Get wether or not the current cell starts a row (is the first one on the row).

Parameters

integer $position

Optional. Forced position.

Returns

boolean

cellEndsRow()

cellEndsRow(integer  $position = null) : boolean

Get wether or not the current cell ends a row (is the last one on the row).

Parameters

integer $position

Optional. Forced position.

Returns

boolean

start()

start() : string

Returns

string

end()

end() : string

Returns

string