Layout

Static methods that arrange interface content into columns, rows, grids, stacks, overlays, padding and fixed sizes. Each method takes a callback that renders the content placed inside the layout.

This page is a pure reference. For how the framework fits together, see the Guide.

Classes
  • Layout - arrange content into columns, rows, grids, stacks, overlays and fixed sizes.

Layout

The main class: static methods that each render a layout and call a content callback to fill it. Provides the same functionality as UiLayout as static class methods. Listed alphabetically.

Column

Layout::Column(callable $content): void

Display column layout.

NameTypeDescription
$contentcallableCallback that renders column content.

Returns void

Grid

Layout::Grid(int $columnCount, callable $content): void

Display grid layout.

NameTypeDescription
$columnCountintNumber of columns in the grid.
$contentcallableCallback that renders grid content.

Returns void

Height

Layout::Height(float $height, callable $content): void

Display height layout.

NameTypeDescription
$heightfloatFixed height.
$contentcallableCallback that renders content.

Returns void

Overlay

Layout::Overlay(callable $content): void

Display overlay layout.

NameTypeDescription
$contentcallableCallback that renders overlay content.

Returns void

Padding

Layout::Padding(callable $content): void

Display padding layout.

NameTypeDescription
$contentcallableCallback that renders padding content.

Returns void

Row

Layout::Row(callable $content): void

Display row layout.

NameTypeDescription
$contentcallableCallback that renders row content.

Returns void

Size

Layout::Size(float $width, float $height, callable $content): void

Display size layout (fixed dimensions).

NameTypeDescription
$widthfloatFixed width.
$heightfloatFixed height.
$contentcallableCallback that renders content.

Returns void

Stack

Layout::Stack(callable $content): void

Display stack layout.

NameTypeDescription
$contentcallableCallback that renders stack content.

Returns void

Stretch

Layout::Stretch(?callable $content = null): void

Display stretch layout.

NameTypeDescription
$content?callableOptional callback that renders stretch content.

Returns void

Width

Layout::Width(float $width, callable $content): void

Display width layout.

NameTypeDescription
$widthfloatFixed width.
$contentcallableCallback that renders content.

Returns void