com\setasign\SetaFramework\View\Helper
RecursiveTemplateJoin Class RecursiveTemplateJoin
File: /SetaFramework/src/View/Helper/RecursiveTemplateJoin.php
Class hierarchy
Summary
Methods
__invoke()
public RecursiveTemplateJoin::__invoke (
iterable<string, array<string, string|array>> $dataArray,
string $tpl,
string|string[] $valueKeys,
string $childKey,
string $childTpl = '',
string $glue = ', '
): stringstring $tpl,
string|string[] $valueKeys,
string $childKey,
string $childTpl = '',
string $glue = ', '
This helper iterates over $dataArray and inserts for every entry a copy of $tpl. $dataArray is meant to be at least 2-dimensional. All {key} placesholders and all $valuesKeys placeholders are replaced with the values of the entry.
If the key $childKey exists in the $dataArray entry it will be "rendered" with a recursive call to this method. The result will be wrapped into $childTpl {childs} and after this inserted into the main $tpl {childs}.
Parameters
- $dataArray : iterable<string, array<string, string|array>>
- $tpl : string
- $valueKeys : string|string[]
- $childKey : string
- $childTpl : string
- $glue : string
