ManagesFragments
trait ManagesFragments (View source)
Properties
protected array | $fragments | All of the captured, rendered fragments. |
|
protected array | $fragmentStack | The stack of in-progress fragment renders. |
Methods
void
startFragment(string $fragment)
Start injecting content into a fragment.
string
stopFragment()
Stop injecting content into a fragment.
mixed
getFragment(string $name, string|null $default = null)
Get the contents of a fragment.
array
getFragments()
Get the entire array of rendered fragments.
void
flushFragments()
Flush all of the fragments.
Details
void
startFragment(string $fragment)
Start injecting content into a fragment.
string
stopFragment()
Stop injecting content into a fragment.
mixed
getFragment(string $name, string|null $default = null)
Get the contents of a fragment.
array
getFragments()
Get the entire array of rendered fragments.
void
flushFragments()
Flush all of the fragments.