FluidTYPO3\Vhs\ViewHelpers\Iterator\AbstractLoopViewHelper::renderIteration PHP Méthode

renderIteration() protected méthode

protected renderIteration ( integer $i, integer $from, integer $to, integer $step, string $iterationArgument ) : string
$i integer
$from integer
$to integer
$step integer
$iterationArgument string
Résultat string
    protected function renderIteration($i, $from, $to, $step, $iterationArgument)
    {
        if (false === empty($iterationArgument)) {
            $cycle = intval(($i - $from) / $step) + 1;
            $iteration = ['index' => $i, 'cycle' => $cycle, 'isOdd' => 0 === $cycle % 2 ? false : true, 'isEven' => 0 === $cycle % 2 ? true : false, 'isFirst' => $i === $from ? true : false, 'isLast' => $this->isLast($i, $from, $to, $step)];
            $this->templateVariableContainer->add($iterationArgument, $iteration);
            $content = $this->renderChildren();
            $this->templateVariableContainer->remove($iterationArgument);
        } else {
            $content = $this->renderChildren();
        }
        return $content;
    }