Zend Framework  3.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
RenderChildModel Class Reference

Helper for rendering child view models. More...

Public Member Functions

 __invoke ($child)
 Invoke as a function.
 
 render ($child)
 Render a model.
 
- Public Member Functions inherited from AbstractHelper
 setView (Renderer $view)
 Set the View object.
 
 getView ()
 Get the view object.
 

Protected Member Functions

 findChild ($child)
 Find the named child model.
 
 getCurrent ()
 Get the current view model.
 
 getViewModelHelper ()
 Retrieve the view model helper.
 

Protected Attributes

 $current
 
 $viewModelHelper
 
- Protected Attributes inherited from AbstractHelper
 $view = null
 

Detailed Description

Helper for rendering child view models.

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

Member Function Documentation

__invoke (   $child)

Invoke as a function.

Proxies to {render()}.

Parameters
string$child
Returns
string
findChild (   $child)
protected

Find the named child model.

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
string$child
Returns
false|Model
getCurrent ( )
protected

Get the current view model.

Exceptions
Exception\RuntimeException
Returns
null|Model
getViewModelHelper ( )
protected

Retrieve the view model helper.

Returns
ViewModel
render (   $child)

Render a model.

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

Parameters
string$child
Returns
string

Member Data Documentation

$current
protected
$viewModelHelper
protected