function layout_builder_theme_suggestions_test_preprocess_item_list__layouts
Same name in other branches
- 9 core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/layout_builder_theme_suggestions_test.module \layout_builder_theme_suggestions_test_preprocess_item_list__layouts()
- 8.9.x core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/layout_builder_theme_suggestions_test.module \layout_builder_theme_suggestions_test_preprocess_item_list__layouts()
- 10 core/modules/layout_builder/tests/modules/layout_builder_theme_suggestions_test/layout_builder_theme_suggestions_test.module \layout_builder_theme_suggestions_test_preprocess_item_list__layouts()
Implements hook_preprocess_HOOK() for the list of layouts.
1 string reference to 'layout_builder_theme_suggestions_test_preprocess_item_list__layouts'
- LayoutBuilderThemeSuggestionsTest::testLayoutListSuggestion in core/
modules/ layout_builder/ tests/ src/ Functional/ LayoutBuilderThemeSuggestionsTest.php - Tests alterations of the layout list via preprocess functions.
File
-
core/
modules/ layout_builder/ tests/ modules/ layout_builder_theme_suggestions_test/ layout_builder_theme_suggestions_test.module, line 13
Code
function layout_builder_theme_suggestions_test_preprocess_item_list__layouts(&$variables) : void {
foreach (array_keys($variables['items']) as $layout_id) {
if (isset($variables['items'][$layout_id]['value']['#title']['icon'])) {
$variables['items'][$layout_id]['value']['#title']['icon'] = [
'#markup' => __FUNCTION__,
];
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.