function file_field_widget_info_alter
Same name in other branches
- 9 core/modules/file/file.module \file_field_widget_info_alter()
- 8.9.x core/modules/file/file.module \file_field_widget_info_alter()
- 11.x core/modules/file/file.module \file_field_widget_info_alter()
Implements hook_field_widget_info_alter().
File
-
core/
modules/ file/ file.module, line 65
Code
function file_field_widget_info_alter(array &$info) {
// Allows using the 'uri' widget for the 'file_uri' field type, which uses it
// as the default widget.
// @see \Drupal\file\Plugin\Field\FieldType\FileUriItem
$info['uri']['field_types'][] = 'file_uri';
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.