function test_theme_element_info_alter

Same name in other branches
  1. 9 core/modules/system/tests/themes/test_theme/test_theme.theme \test_theme_element_info_alter()
  2. 8.9.x core/modules/system/tests/themes/test_theme/test_theme.theme \test_theme_element_info_alter()
  3. 11.x core/modules/system/tests/themes/test_theme/test_theme.theme \test_theme_element_info_alter()

Implements hook_element_info_alter().

File

core/modules/system/tests/themes/test_theme/test_theme.theme, line 18

Code

function test_theme_element_info_alter(&$info) {
    // Decrease the default size of textfields.
    if (isset($info['textfield']['#size'])) {
        $info['textfield']['#size'] = 40;
    }
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.