Helper for rendering child view models

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

package Default
inherited_from \Zend\View\Helper\AbstractHelper

 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\HelperInterface::getView()

Returns

null\Zend\View\Renderer\RendererInterface

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\HelperInterface::setView()

Parameters

$view

\Zend\View\Renderer\RendererInterface

Returns

\Zend\View\Helper\AbstractHelper

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

false\Zend\View\Model\ModelInterface

Get the current view model

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

Exceptions

\Zend\View\Exception\RuntimeException

Returns

null\Zend\View\Model\ModelInterface

Retrieve the view model helper

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

Returns

\Zend\View\Helper\ViewModel

 Properties

 

Current view model

$current : \Zend\View\Model\ModelInterface

Default

 

View object instance

$view : \Zend\View\Renderer\RendererInterface

Default

null
 

View model helper instance

$viewModelHelper : \Zend\View\Helper\ViewModel

Default