Suggestion #29294

IncreaseValue ViewHelper

Added by David Greiner almost 10 years ago.

Status:
New
Priority:
Could have
Assignee:
-
Start date:
2011-08-27
Due date:
% Done:

0%

Estimated time:
Has patch:
No
Tags:

Description

This ViewHelper increases a value in foreach-loops.


    protected $increasedValue;

    /**
     *
     * @param int $value 
     * @validate $value IntegerValidator
     * @return int
     */
    public function render($value) {

        $this->increasedValue = $this->increasedValue+$value;
        return $this->increasedValue;
    }
}

No data to display

Also available in: Atom PDF