Documentation

ManagesLayouts

Table of Contents

$parentPlaceholder  : mixed
The parent placeholder for the request.
$sections  : array<string|int, mixed>
All of the finished, captured sections.
$sectionStack  : array<string|int, mixed>
The stack of in-progress sections.
appendSection()  : string
Stop injecting content into a section and append it.
flushSections()  : void
Flush all of the sections.
getSection()  : mixed
Get the contents of a section.
getSections()  : array<string|int, mixed>
Get the entire array of sections.
hasSection()  : bool
Check if section exists.
inject()  : void
Inject inline content into a section.
parentPlaceholder()  : string
Get the parent placeholder for the current request.
startSection()  : void
Start injecting content into a section.
stopSection()  : string
Stop injecting content into a section.
yieldContent()  : string
Get the string contents of a section.
yieldSection()  : string
Stop injecting content into a section and return its contents.
extendSection()  : void
Append content to a given section.

Properties

$parentPlaceholder

The parent placeholder for the request.

protected static mixed $parentPlaceholder = []

$sections

All of the finished, captured sections.

protected array<string|int, mixed> $sections = []

$sectionStack

The stack of in-progress sections.

protected array<string|int, mixed> $sectionStack = []

Methods

appendSection()

Stop injecting content into a section and append it.

public appendSection() : string
Tags
throws
InvalidArgumentException
Return values
string

flushSections()

Flush all of the sections.

public flushSections() : void
Return values
void

getSection()

Get the contents of a section.

public getSection(string $name[, string $default = null ]) : mixed
Parameters
$name : string
$default : string = null
Return values
mixed

getSections()

Get the entire array of sections.

public getSections() : array<string|int, mixed>
Return values
array<string|int, mixed>

hasSection()

Check if section exists.

public hasSection(string $name) : bool
Parameters
$name : string
Return values
bool

inject()

Inject inline content into a section.

public inject(string $section, string $content) : void
Parameters
$section : string
$content : string
Return values
void

parentPlaceholder()

Get the parent placeholder for the current request.

public static parentPlaceholder([string $section = '' ]) : string
Parameters
$section : string = ''
Return values
string

startSection()

Start injecting content into a section.

public startSection(string $section[, string|null $content = null ]) : void
Parameters
$section : string
$content : string|null = null
Return values
void

stopSection()

Stop injecting content into a section.

public stopSection([bool $overwrite = false ]) : string
Parameters
$overwrite : bool = false
Tags
throws
InvalidArgumentException
Return values
string

yieldContent()

Get the string contents of a section.

public yieldContent(string $section[, string $default = '' ]) : string
Parameters
$section : string
$default : string = ''
Return values
string

yieldSection()

Stop injecting content into a section and return its contents.

public yieldSection() : string
Return values
string

extendSection()

Append content to a given section.

protected extendSection(string $section, string $content) : void
Parameters
$section : string
$content : string
Return values
void

Search results