hook_field_info_alter(&$info)
Perform alterations on Field API field types.
$info: Array of information on field types as collected by the "field type" plugin manager.
function hook_field_info_alter(&$info) {
// Change the default widget for fields of type 'foo'.
if (isset($info['foo'])) {
$info['foo']['default widget'] = 'mymodule_widget';
}
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!modules!field!field.api.php/function/hook_field_info_alter/8.1.x