function bricks_preprocess_field in Bricks 8
Same name and namespace in other branches
- 2.x bricks.module \bricks_preprocess_field()
Prepares variables for `field.html.twig`.
File
- ./
bricks.module, line 9
Code
function bricks_preprocess_field(&$variables) {
$element = $variables['element'];
if (in_array($element['#formatter'], [
'bricks_nested',
'bricks_nested_dynamic',
])) {
$variables['items'] = [
[
'content' => _bricks_nest_items($element, $variables['items']),
],
];
}
}