Pull merge.
[yaffs-website] / vendor / chi-teck / drupal-code-generator / templates / d7 / hook / field_info_alter.twig
1 /**
2  * Implements hook_field_info_alter().
3  */
4 function {{ machine_name }}_field_info_alter(&$info) {
5   // Add a setting to all field types.
6   foreach ($info as $field_type => $field_type_info) {
7     $info[$field_type]['settings'] += array(
8       'mymodule_additional_setting' => 'default value',
9     );
10   }
11
12   // Change the default widget for fields of type 'foo'.
13   if (isset($info['foo'])) {
14     $info['foo']['default widget'] = 'mymodule_widget';
15   }
16 }