trait
Illuminate
/
View
/
Concerns
/
ManagesLayouts
You are viewing an older version of the documentation. For the latest, please visit master documentation.
ManagesLayouts
Properties
protected
$sections array
All of the finished, captured sections.
Default: []
protected
$sectionStack array
The stack of in-progress sections.
Default: []
protected
static
$parentPlaceholder mixed
The parent placeholder for the request.
Default: []
protected
static
$parentPlaceholderSalt string
The parent placeholder salt for the request.
Default: null
Methods
public
startSection ( $section , $content ) : void
Start injecting content into a section.
Parameters
- $section string
- $content string|null
public
inject ( $section , $content ) : void
Inject inline content into a section.
Parameters
- $section string
- $content string
public
yieldSection ( ) : string
Stop injecting content into a section and return its contents.
public
stopSection ( $overwrite ) : string
Stop injecting content into a section.
Parameters
- $overwrite bool
public
appendSection ( ) : string
Stop injecting content into a section and append it.
protected
extendSection ( $section , $content ) : void
Append content to a given section.
Parameters
- $section string
- $content string
public
yieldContent ( $section , $default ) : string
Get the string contents of a section.
Parameters
- $section string
- $default string
public
static
parentPlaceholder ( $section ) : string
Get the parent placeholder for the current request.
Parameters
- $section string
protected
static
parentPlaceholderSalt ( ) : string
Get the parent placeholder salt.
public
hasSection ( $name ) : bool
Check if section exists.
Parameters
- $name string
public
sectionMissing ( $name ) : bool
Check if section does not exist.
Parameters
- $name string
public
getSection ( $name , $default ) : mixed
Get the contents of a section.
Parameters
- $name string
- $default string|null
public
getSections ( ) : array
Get the entire array of sections.
public
flushSections ( ) : void
Flush all of the sections.