You are here

function _ds_styles_match_options in Display Suite 6.3

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

Match option labels from specified option values.

2 calls to _ds_styles_match_options()
ds_display_overview_form in includes/ds.display.inc
Menu callback; presents a listing of fields display settings for an object type.
ds_fields_display_form in includes/ds.display.inc
Add fields to display overview form.

File

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

Code

function _ds_styles_match_options($options, $values) {
  $matches = array();
  foreach ($options as $optkey => $optvalue) {
    if (is_array($optvalue)) {
      $matches = array_merge($matches, _ds_styles_match_options($optvalue, $values));
    }
    elseif (in_array($optkey, $values, TRUE)) {
      $matches[] = $optvalue;
    }
  }
  return $matches;
}