mirror of
https://github.com/flextype/flextype.git
synced 2025-08-06 13:16:45 +02:00
fix(expressions): fix collection expression
This commit is contained in:
@@ -32,10 +32,10 @@ class CollectionExpression implements ExpressionFunctionProviderInterface
|
||||
return [
|
||||
new ExpressionFunction('collection', fn($items = null) => '\Flextype\collection($items)', fn($arguments, $items = null) => collection($items)),
|
||||
new ExpressionFunction('collectionFromJson', fn(string $input, bool $assoc = true, int $depth = 512, int $flags = 0) => '\Flextype\ccollectionFromJson($input, $assoc, $depth, $flags)', fn($arguments, string $input, bool $assoc = true, int $depth = 512, int $flags = 0) => collectionFromJson($input, $assoc, $depth, $flags)),
|
||||
new ExpressionFunction('collectionFromString', fn(string $string, string $separator) => '\Flextype\ccollectionFromString($string, $separator)', fn($arguments, string $string, string $separator) => collectionFromString($string, $separator)),
|
||||
new ExpressionFunction('collectionWithRange', fn($low, $high, int $step = 1) => '\Flextype\ccollectionWithRange($low, $high, $step)', fn($arguments, $low, $high, int $step = 1) => collectionWithRange($low, $high, $step)),
|
||||
new ExpressionFunction('collectionFromQueryString', fn(string $string) => '\Flextype\ccollectionFromQueryString($string)', fn($arguments, string $string) => collectionFromQueryString($string)),
|
||||
new ExpressionFunction('filterCollection', fn($items = [], array $options = []) => '\Flextype\cfilterCollection($items, $options)', fn($arguments, $items = [], array $options = []) => filterCollection($items, $options)),
|
||||
new ExpressionFunction('collectionFromString', fn(string $string, string $separator) => '\Flextype\collectionFromString($string, $separator)', fn($arguments, string $string, string $separator) => collectionFromString($string, $separator)),
|
||||
new ExpressionFunction('collectionWithRange', fn($low, $high, int $step = 1) => '\Flextype\collectionWithRange($low, $high, $step)', fn($arguments, $low, $high, int $step = 1) => collectionWithRange($low, $high, $step)),
|
||||
new ExpressionFunction('collectionFromQueryString', fn(string $string) => '\Flextype\collectionFromQueryString($string)', fn($arguments, string $string) => collectionFromQueryString($string)),
|
||||
new ExpressionFunction('filterCollection', fn($items = [], array $options = []) => '\Flextype\filterCollection($items, $options)', fn($arguments, $items = [], array $options = []) => filterCollection($items, $options)),
|
||||
];
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user