You are here

function slickgrid_get_plugin_options_for_field in Slickgrid 7

Same name and namespace in other branches
  1. 7.2 slickgrid.module \slickgrid_get_plugin_options_for_field()
1 call to slickgrid_get_plugin_options_for_field()
slickgrid_views_plugin::options_form in includes/slickgrid_views_plugin.inc
Add settings for the particular slickgrid.

File

./slickgrid.module, line 272

Code

function slickgrid_get_plugin_options_for_field($plugin_type, $field_type) {
  $options = array();
  $plugins = slickgrid_get_plugins($plugin_type);
  foreach ($plugins as $type => $plugin) {
    if (!isset($plugin['field_types'])) {
      $options[$type] = $plugin['title'];
    }
    elseif (in_array($field_type, $plugin['field_types'])) {
      $options[$type] = $plugin['title'];
    }
  }
  if (count($options)) {
    $options = array_merge(array(
      '' => '<none>',
    ), $options);
  }
  return $options;
}