You are here

function references_dialog_field_widget_info_alter in References dialog 7

Implements hook_widget_info_alter().

File

./references_dialog.module, line 193
This the main module file.

Code

function references_dialog_field_widget_info_alter(array &$info) {

  // Adds settings that we need to declare to widgets we are extending.
  foreach (references_dialog_widgets() as $widget_name => $widget_info) {
    if (isset($info[$widget_name]['settings'])) {
      foreach (array_keys($widget_info['operations']) as $operation) {
        $info[$widget_name]['settings']['references_dialog_' . $operation] = 0;

        // Add search view setting if we have search.
        if ($operation == 'search') {
          $info[$widget_name]['settings']['references_dialog_search_view'] = '';
        }
      }
    }
  }
}