class Factory implements Factory (View source)
ManagesComponents |
ManagesEvents |
ManagesLayouts |
ManagesLoops |
ManagesStacks |
ManagesTranslations |
void | startComponent(string $name, array $data = array()) Start a component rendering process. | from ManagesComponents |
string | renderComponent() Render the current component. | from ManagesComponents |
void | slot(string $name, string|null $content = null) Start the slot rendering process. | from ManagesComponents |
void | endSlot() Save the slot content for rendering. | from ManagesComponents |
array | creator(array|string $views, Closure|string $callback) Register a view creator event. | from ManagesEvents |
array | composers(array $composers) Register multiple view composers via an array. | from ManagesEvents |
array | composer(array|string $views, Closure|string $callback) Register a view composer event. | from ManagesEvents |
void | callComposer(View $view) Call the composer for a given view. | from ManagesEvents |
void | callCreator(View $view) Call the creator for a given view. | from ManagesEvents |
void | startSection(string $section, string|null $content = null) Start injecting content into a section. | from ManagesLayouts |
void | inject(string $section, string $content) Inject inline content into a section. | from ManagesLayouts |
string | yieldSection() Stop injecting content into a section and return its contents. | from ManagesLayouts |
string | stopSection(bool $overwrite = false) Stop injecting content into a section. | from ManagesLayouts |
string | appendSection() Stop injecting content into a section and append it. | from ManagesLayouts |
string | yieldContent(string $section, string $default = '') Get the string contents of a section. | from ManagesLayouts |
static string | parentPlaceholder(string $section = '') Get the parent placeholder for the current request. | from ManagesLayouts |
bool | hasSection(string $name) Check if section exists. | from ManagesLayouts |
array | getSections() Get the entire array of sections. | from ManagesLayouts |
void | flushSections() Flush all of the sections. | from ManagesLayouts |
void | addLoop(Countable|array $data) Add new loop to the stack. | from ManagesLoops |
void | incrementLoopIndices() Increment the top loop's indices. | from ManagesLoops |
void | popLoop() Pop a loop from the top of the loop stack. | from ManagesLoops |
StdClass|null | getLastLoop() Get an instance of the last loop in the stack. | from ManagesLoops |
array | getLoopStack() Get the entire loop stack. | from ManagesLoops |
void | startPush(string $section, string $content = '') Start injecting content into a push section. | from ManagesStacks |
string | stopPush() Stop injecting content into a push section. | from ManagesStacks |
void | startPrepend(string $section, string $content = '') Start prepending content into a push section. | from ManagesStacks |
string | stopPrepend() Stop prepending content into a push section. | from ManagesStacks |
string | yieldPushContent(string $section, string $default = '') Get the string contents of a push section. | from ManagesStacks |
void | flushStacks() Flush all of the stacks. | from ManagesStacks |
void | startTranslation(array $replacements = array()) Start a translation block. | from ManagesTranslations |
string | renderTranslation() Render the current translation. | from ManagesTranslations |
void | __construct(EngineResolver $engines, ViewFinderInterface $finder, Dispatcher $events) Create a new view factory instance. | |
View | file(string $path, array $data = array(), array $mergeData = array()) Get the evaluated view contents for the given view. | |
View | make(string $view, array $data = array(), array $mergeData = array()) Get the evaluated view contents for the given view. | |
string | renderEach(string $view, array $data, string $iterator, string $empty = 'raw|') Get the rendered contents of a partial from a loop. | |
bool | exists(string $view) Determine if a given view exists. | |
EngineInterface | getEngineFromPath(string $path) Get the appropriate view engine for the given path. | |
mixed | share(array|string $key, mixed $value = null) Add a piece of shared data to the environment. | |
void | incrementRender() Increment the rendering counter. | |
void | decrementRender() Decrement the rendering counter. | |
bool | doneRendering() Check if there are no active render operations. | |
void | addLocation(string $location) Add a location to the array of view locations. | |
$this | addNamespace(string $namespace, string|array $hints) Add a new namespace to the loader. | |
$this | prependNamespace(string $namespace, string|array $hints) Prepend a new namespace to the loader. | |
$this | replaceNamespace(string $namespace, string|array $hints) Replace the namespace hints for the given namespace. | |
void | addExtension(string $extension, string $engine, Closure $resolver = null) Register a valid view extension and its engine. | |
void | flushState() Flush all of the factory state like sections and stacks. | |
void | flushStateIfDoneRendering() Flush all of the section contents if done rendering. | |
array | getExtensions() Get the extension to engine bindings. | |
EngineResolver | getEngineResolver() Get the engine resolver instance. | |
ViewFinderInterface | getFinder() Get the view finder instance. | |
void | setFinder(ViewFinderInterface $finder) Set the view finder instance. | |
void | flushFinderCache() Flush the cache of views located by the finder. | |
Dispatcher | getDispatcher() Get the event dispatcher instance. | |
void | setDispatcher(Dispatcher $events) Set the event dispatcher instance. | |
Container | getContainer() Get the IoC container instance. | |
void | setContainer(Container $container) Set the IoC container instance. | |
mixed | shared(string $key, mixed $default = null) Get an item from the shared data. | |
array | getShared() Get all of the shared data for the environment. |
Start a component rendering process.
Render the current component.
Start the slot rendering process.
Save the slot content for rendering.
Register a view creator event.
Register multiple view composers via an array.
Register a view composer event.
Call the composer for a given view.
Call the creator for a given view.
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.
Get the string contents of a section.
Get the parent placeholder for the current request.
Check if section exists.
Get the entire array of sections.
Flush all of the sections.
Add new loop to the stack.
Increment the top loop's indices.
Pop a loop from the top of the loop stack.
Get an instance of the last loop in the stack.
Get the entire loop stack.
Start injecting content into a push section.
Stop injecting content into a push section.
Start prepending content into a push section.
Stop prepending content into a push section.
Get the string contents of a push section.
Flush all of the stacks.
Start a translation block.
Render the current translation.
Create a new view factory instance.
Get the evaluated view contents for the given view.
Get the evaluated view contents for the given view.
Get the rendered contents of a partial from a loop.
Determine if a given view exists.
Get the appropriate view engine for the given path.
Add a piece of shared data to the environment.
Increment the rendering counter.
Decrement the rendering counter.
Check if there are no active render operations.
Add a location to the array of view locations.
Add a new namespace to the loader.
Prepend a new namespace to the loader.
Replace the namespace hints for the given namespace.
Register a valid view extension and its engine.
Flush all of the factory state like sections and stacks.
Flush all of the section contents if done rendering.
Get the extension to engine bindings.
Get the engine resolver instance.
Get the view finder instance.
Set the view finder instance.
Flush the cache of views located by the finder.
Get the event dispatcher instance.
Set the event dispatcher instance.
Get the IoC container instance.
Set the IoC container instance.
Get an item from the shared data.
Get all of the shared data for the environment.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.4/Illuminate/View/Factory.html