You are here

function ds_plugins_display_form in Display Suite 6.3

Same name and namespace in other branches
  1. 6 includes/ds.display.inc \ds_plugins_display_form()
  2. 6.2 includes/ds.display.inc \ds_plugins_display_form()

Add plugins to display overview form.

Parameters

array $form The display form.:

array $display_settings Current display settings.:

1 call to ds_plugins_display_form()
ds_display_overview_form in includes/ds.display.inc
Menu callback; presents a listing of fields display settings for an object type.

File

includes/ds.display.inc, line 493
Display overview form.

Code

function ds_plugins_display_form(&$form, $display_settings) {
  $module = $form['#module'];
  $plugins = variable_get($module . '_plugin_settings', array());
  if (!empty($plugins)) {
    $form['#plugins'] = TRUE;
    $form['#plugin_keys'] = array();
    foreach ($plugins as $key => $data) {
      if (isset($data['filename'])) {
        require_once $data['filename'];
      }
      $class = $data['class'];
      $plugin = new $class();
      $plugin_form = $plugin
        ->plugin_form($form, $display_settings);
      $form['#plugin_keys'][$key] = $data['title'];
    }
  }
}