Cycle ViewHelper <f:cycle>
This ViewHelper cycles through the specified values. This can be often used to specify CSS classes for example.
To achieve the "zebra class" effect in a loop you can also use the "iteration" argument of the for ViewHelper.
Go to the source code of this ViewHelper: CycleViewHelper.php (GitHub).
Arguments of the <f:cycle> ViewHelper
as
-
- Type
- string
- Required
- 1
The name of the iteration variable
values
-
- Type
- array
The array or object implementing \ArrayAccess (for example \SplObjectStorage) to iterated over