Cms\Classes\PartialStack

Source: ~/modules/cms/classes/PartialStack.php

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

Public properties

public array $activePartial

The current partial "object" being rendered.

Protected properties

protected array $partialStack

Collection of previously rendered partial "objects".

Public methods

public void addComponent($alias, $componentObj)

Adds a component to the active partial stack.

Parameters
  • $alias
  • $componentObj

public void getComponent($name)

Returns a component by its alias from the partial stack.

Parameters
  • $name

public void stackPartial()

Partial entry point, appends a new partial to the stack.

public void unstackPartial()

Partial exit point, removes the active partial from the stack.

Protected methods

protected void findComponentFromStack($name, $stack)

Locates a component by its alias from the supplied stack.

Parameters
  • $name
  • $stack