ManagesComponents
trait ManagesComponents
Constants
| protected COMPONENT_STACK_CONTEXT_KEY |
Context key for the components being rendered. |
| protected COMPONENT_DATA_CONTEXT_KEY |
Context key for the original data passed to the component. |
| protected CURRENT_COMPONENT_DATA_CONTEXT_KEY |
Context key for the component data for the component that is currently being rendered. |
| protected SLOTS_CONTEXT_KEY |
Context key for the slot contents for the component. |
| protected SLOT_STACK_CONTEXT_KEY |
Context key for the names of the slots being rendered. |
Methods
Start a component rendering process.
No description
No description
No description
Get the first view that actually exists from the given list, and start a component.
Render the current component.
Get the data for the given component.
Get an item from the component data that exists above the current component.
Start the slot rendering process.
No description
No description
Save the slot content for rendering.
Get the index for the current component.
Flush all of the component state.
Details
at line 44
void
startComponent(View|Htmlable|Closure|string $view, array $data = [])
Start a component rendering process.
at line 73
protected void
appendComponentData(array $data)
No description
at line 80
protected
createSlotContext()
No description
at line 90
void
startComponentFirst(array $names, array $data = [])
Get the first view that actually exists from the given list, and start a component.
at line 102
string
renderComponent()
Render the current component.
at line 130
protected array
componentData()
Get the data for the given component.
at line 155
mixed
getConsumableComponentData(string $key, mixed $default = null)
Get an item from the component data that exists above the current component.
at line 186
void
slot(string $name, string|null $content = null, array $attributes = [])
Start the slot rendering process.
at line 197
protected void
setSlotData(string $name, string|ComponentSlot|null $content)
No description
at line 206
protected void
pushSlotStack(array $value)
No description
at line 215
protected array
popSlotStack()
No description
at line 229
void
endSlot()
Save the slot content for rendering.
at line 244
protected int
currentComponent()
Get the index for the current component.
at line 253
protected void
flushComponents()
Flush all of the component state.