abstract class TurboStream (View source)

Helper class for making elements.

Methods

static string|null
replace(Component $component)

Make a Turbo Stream to replace a streamable component.

static string|null
remove(Component $component)

Make a Turbo Stream to remove a streamable component.

static string
append(Component $component, string $targets)

Make a Turbo Stream to append a component to a target.

static string
prepend(Component $component, string $targets)

Make a Turbo Stream to prepend a component to a target.

static string
before(Component $component, string $targets)

Make a Turbo Stream to insert a component before a target.

static string
after(Component $component, string $targets)

Make a Turbo Stream to insert a component after a target.

Details

static string|null replace(Component $component)

Make a Turbo Stream to replace a streamable component.

Parameters

Component $component

Return Value

string|null

static string|null remove(Component $component)

Make a Turbo Stream to remove a streamable component.

Parameters

Component $component

Return Value

string|null

static string append(Component $component, string $targets)

Make a Turbo Stream to append a component to a target.

Parameters

Component $component
string $targets

Return Value

string

static string prepend(Component $component, string $targets)

Make a Turbo Stream to prepend a component to a target.

Parameters

Component $component
string $targets

Return Value

string

static string before(Component $component, string $targets)

Make a Turbo Stream to insert a component before a target.

Parameters

Component $component
string $targets

Return Value

string

static string after(Component $component, string $targets)

Make a Turbo Stream to insert a component after a target.

Parameters

Component $component
string $targets

Return Value

string