system_theme_suggestions_field

system_theme_suggestions_field(array $variables)

Implements hook_theme_suggestions_HOOK().

File

core/modules/system/system.module, line 313
Configuration system that lets administrators modify the workings of the site.

Code

1
2
3
4
5
6
7
8
9
10
11
12
function system_theme_suggestions_field(array $variables) {
  $suggestions = array();
  $element = $variables['element'];
 
  $suggestions[] = 'field__' . $element['#field_type'];
  $suggestions[] = 'field__' . $element['#field_name'];
  $suggestions[] = 'field__' . $element['#entity_type'] . '__' . $element['#bundle'];
  $suggestions[] = 'field__' . $element['#entity_type'] . '__' . $element['#field_name'];
  $suggestions[] = 'field__' . $element['#entity_type'] . '__' . $element['#field_name'] . '__' . $element['#bundle'];
 
  return $suggestions;
}
doc_Drupal
2025-01-10 15:47:30
Comments
Leave a Comment

Please login to continue.