You are here

function commerce_option_get_sets in Commerce Product Option 7

3 calls to commerce_option_get_sets()
commerce_option_entity_info_alter in ./commerce_option.module
Implements hook_entity_info_alter().
commerce_option_set_load in ./commerce_option.module
Loads a option set
commerce_option_set_reference_field_widget_form in option_set_reference/commerce_option_set_reference.module
Implements hook_field_widget_form().
1 string reference to 'commerce_option_get_sets'
commerce_option_set_form in includes/commerce_option_set.forms.inc

File

./commerce_option.module, line 227

Code

function commerce_option_get_sets($set_id = NULL) {
  $sets = entity_load('commerce_option_set', isset($set_id) ? array(
    $set_id,
  ) : FALSE, array(), TRUE);
  return isset($set_id) ? reset($sets) : $sets;
}