Helper for rendering child view models

Finds children matching "capture-to" values, and renders them using the composed view instance.

 Methods

Invoke as a function

__invoke(string $child) : string

Proxies to {render()}.

Parameters

$child

string

Returns

string

Get the view object

getView() : null | \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::getView()

Returns

Render a model

render(string $child) : string

If a matching child model is found, it is rendered. If not, an empty string is returned.

Parameters

$child

string

Returns

string

Set the View object

setView(\Zend\View\Renderer\RendererInterface $view) : \Zend\View\Helper\AbstractHelper
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::setView()

Parameters

Returns

Find the named child model

findChild(string $child) : false | \Zend\View\Model\ModelInterface

Iterates through the current view model, looking for a child model that has a captureTo value matching the requested $child. If found, that child model is returned; otherwise, a boolean false is returned.

Parameters

$child

string

Returns

Get the current view model

getCurrent() : null | \Zend\View\Model\ModelInterface

Retrieve the view model helper

getViewModelHelper() : \Zend\View\Helper\ViewModel

 Properties

 

Current view model

$current : \Zend\View\Model\ModelInterface

 

View object instance

$view : \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::$$view
 

View model helper instance

$viewModelHelper : \Zend\View\Helper\ViewModel