Class PartialLoop

Summary

Fully Qualified Name: Zend\View\Helper\PartialLoop
Extends: Partial

Description

Helper for rendering a template fragment in its own variable scope; iterates over data provided and renders for each iteration.

Methods

Name Description Defined By
__invoke() Renders a template fragment within a variable scope distinct from the calling View object. PartialLoop
getObjectKey() Retrieve object key Partial
getPartialCounter() Get the partial counter PartialLoop
getView() Get the view object AbstractHelper
loop() Renders a template fragment within a variable scope distinct from the calling View object. PartialLoop
setObjectKey() Set object key in this loop and any child loop PartialLoop
setView() Set the View object AbstractHelper

Method Details

__invoke()

Renders a template fragment within a variable scope distinct from the calling View object.

If no arguments are provided, returns object instance.

Parameter Name Type Description
$name string Name
$values array Variables

Returns: string

getObjectKey()

Retrieve object key

The objectKey is the variable to which an object in the iterator will be assigned.

Returns: null|string

getPartialCounter()

Get the partial counter

Returns: int

getView()

Get the view object

Returns: null|\Renderer

loop()

Renders a template fragment within a variable scope distinct from the calling View object.

Parameter Name Type Description
$name string Name
$values array Variables

Returns: string

setObjectKey()

Set object key in this loop and any child loop

{@inheritDoc}

Parameter Name Type Description
$key string|null

Returns: self

setView()

Set the View object

Parameter Name Type Description
$view \Renderer

Returns: \AbstractHelper

Top