Cms\Classes\PartialStack

Overview

PartialStack manager for stacking nested partials and keeping track of their components. Partial "objects" store the components used by that partial for deferred retrieval.


Protected Properties

protected array $activePartial

activePartial object being rendered.

protected array $partialStack

partialStack of previously rendered partial objects.


Public Methods

public addComponent()

public addComponent($alias, $componentObj): void

addComponent to the active partial stack.

public addPartialObj()

public addPartialObj($partialObj): void

public findPartialByHandler()

public findPartialByHandler($handler): void

findHandlerFromStack

public getComponent()

public getComponent($name): void

getComponent returns a component by its alias from the partial stack.

public getPartialObj()

public getPartialObj(): void

public stackPartial()

public stackPartial(): void

stackPartial is the partial entry point, appends a new partial to the stack.

public unstackPartial()

public unstackPartial(): void

unstackPartial is the partial exit point, removes the active partial from the stack.

Protected Methods

protected findComponentFromStack()

protected findComponentFromStack($name, $stack): void

findComponentFromStack locates a component by its alias from the supplied stack.