Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 04089e0

Browse files
author
Bryan Folliot
committed
Add loop method to \Zend\View\Helper\PartialLoop
1 parent 67c6ed9 commit 04089e0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/Helper/PartialLoop.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,20 @@ public function __invoke($name = null, $values = null)
5858
if (0 == func_num_args()) {
5959
return $this;
6060
}
61+
return $this->loop($name, $values);
62+
}
6163

64+
/**
65+
* Renders a template fragment within a variable scope distinct from the
66+
* calling View object.
67+
*
68+
* @param string $name Name of view script
69+
* @param array $values Variables to populate in the view
70+
* @throws Exception\InvalidArgumentException
71+
* @return string
72+
*/
73+
public function loop($name = null, $values = null)
74+
{
6275
// reset the counter if it's called again
6376
$this->partialCounter = 0;
6477
$content = '';

0 commit comments

Comments
 (0)