ManagesLayouts
trait ManagesLayouts
Constants
| protected SECTIONS_CONTEXT_KEY |
Context key for finished, captured sections. |
| protected SECTION_STACK_CONTEXT_KEY |
Context key for the stack of in-progress sections. |
Properties
| static protected string|null | $parentPlaceholderSalt | The parent placeholder salt for the worker. |
Methods
Start injecting content into a section.
Inject inline content into a section.
Stop injecting content into a section and return its contents.
Stop injecting content into a section.
Stop injecting content into a section and append it.
Append content to a given section.
Get the parent placeholder for the given section.
Get the parent placeholder salt.
Check if section exists.
Check if section does not exist.
Get the contents of a section.
Get the entire array of sections.
Flush all of the sections.
Details
at line 32
void
startSection(string $section, string|View|null $content = null)
Start injecting content into a section.
at line 49
void
inject(string $section, string $content)
Inject inline content into a section.
at line 57
string
yieldSection()
Stop injecting content into a section and return its contents.
at line 73
string
stopSection(bool $overwrite = false)
Stop injecting content into a section.
at line 100
string
appendSection()
Stop injecting content into a section and append it.
at line 125
protected void
extendSection(string $section, string $content)
Append content to a given section.
at line 140
string
yieldContent(string $section, string|View $default = '')
Get the string contents of a section.
at line 159
static string
parentPlaceholder(string $section = '')
Get the parent placeholder for the given section.
at line 168
static protected string
parentPlaceholderSalt()
Get the parent placeholder salt.
at line 176
bool
hasSection(string $name)
Check if section exists.
at line 185
bool
sectionMissing(string $name)
Check if section does not exist.
at line 193
mixed
getSection(string $name, string|null $default = null)
Get the contents of a section.
at line 202
array
getSections()
Get the entire array of sections.
at line 210
void
flushSections()
Flush all of the sections.