2 namespace TYPO3\CMS\Fluid\ViewHelpers;
75 if ($this->values === null) {
78 if ($this->currentCycleIndex === null || $this->currentCycleIndex >= count($this->values)) {
79 $this->currentCycleIndex = 0;
83 $this->templateVariableContainer->add($as, $currentValue);
85 $this->templateVariableContainer->remove($as);
87 $this->currentCycleIndex ++;
102 if (!
$values instanceof \Traversable) {
103 throw new \TYPO3\CMS\Fluid\Core\ViewHelper\Exception(
'CycleViewHelper only supports arrays and objects implementing \Traversable interface', 1248728394);
105 $this->values = iterator_to_array(
$values,
false);
107 $this->values = array_values(
$values);
109 $this->currentCycleIndex = 0;