Project

General

Profile

Feature #93099 » local_history.patch

Dieter Porth, 2020-12-17 14:41

View differences:

vendor/typo3fluid/fluid/src/ViewHelpers/ForViewHelper.php (date 1608215296972)
$this->registerArgument('key', 'string', 'Variable to assign array key to', false);
$this->registerArgument('reverse', 'boolean', 'If TRUE, iterates in reverse', false, false);
$this->registerArgument('iteration', 'string', 'The name of the variable to store iteration information (index, cycle, isFirst, isLast, isEven, isOdd)');
$this->registerArgument('delim', 'string', 'The delimiter to for exploding, if each recieve an string instead of an array.', false, ',');
}
/**
......
if (!isset($arguments['each'])) {
return '';
}
if ((is_string($arguments['each'])) && (!empty($arguments['each']))) {
$delim = isset($arguments['delim']) ? $arguments['delim'] : ',';
$arguments['each'] = array_filter(explode($delim, $arguments['each']));
}
if (is_object($arguments['each']) && !$arguments['each'] instanceof \Traversable) {
throw new ViewHelper\Exception('ForViewHelper only supports arrays and objects implementing \Traversable interface', 1248728393);
}
(1-1/2)