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

package Zend_View
subpackage Helper
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_View_Helper_Partial

 Methods

Clone the current View

cloneView() : \Zend_View_Interface
Inherited

Returns

\Zend_View_Interface

Strategy pattern: currently unutilized

direct() : void
Inherited
inherited_from \Zend_View_Helper_Interface::direct()

Retrieve object key

getObjectKey() : null | string
Inherited

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

Returns

nullstring

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

partial(string $name = null, string|array $module = null, array $model = null) : string | \Zend_View_Helper_Partial
Inherited

If no arguments are passed, returns the helper instance.

If the $model is an array, it is passed to the view object's assign() method.

If the $model is an object, it first checks to see if the object implements a 'toArray' method; if so, it passes the result of that method to to the view object's assign() method. Otherwise, the result of get_object_vars() is passed.

Parameters

$name

string

Name of view script

$module

stringarray

If $model is empty, and $module is an array, these are the variables to populate in the view. Otherwise, the module in which the partial resides

$model

array

Variables to populate in the view

Returns

string\Zend_View_Helper_Partial

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

partialLoop(string $name = null, string|array $module = null, array $model = null) : string

If no arguments are provided, returns object instance.

Parameters

$name

string

Name of view script

$module

stringarray

If $model is empty, and $module is an array, these are the variables to populate in the view. Otherwise, the module in which the partial resides

$model

array

Variables to populate in the view

Returns

string

Set object key

setObjectKey(string $key) : \Zend_View_Helper_Partial
Inherited

Parameters

$key

string

Returns

\Zend_View_Helper_Partial

Set the View object

setView(\Zend_View_Interface $view) : \Zend_View_Helper_Abstract
Inherited
inherited_from \Zend_View_Helper_Interface::setView()

Parameters

$view

\Zend_View_Interface

Returns

\Zend_View_Helper_Abstract

 Properties

 

View object

$view : \Zend_View_Interface

Default

null
 

Variable to which object will be assigned

$_objectKey : string

Default

 

Marker to where the pointer is at in the loop

$partialCounter : integer

Default

0