You are here

function commerce_bpc_setting_set in Commerce Bulk Product Creation 7.2

Same name and namespace in other branches
  1. 7 commerce_bpc.settings.inc \commerce_bpc_setting_set()

Sets a variable value.

Parameters

string $group: String specifying the settings group this variable belongs to.

string $varname: The name of the variable.

mixed $value: The value of the variable.

string $type: (optional) The product type for which the value is being set. Pass NULL in order to set the global value.

3 calls to commerce_bpc_setting_set()
commerce_bpc_settings_form_submit in ./commerce_bpc.settings.inc
Form submission handler for commerce_bpc_settings_form().
commerce_bpc_update_7101 in ./commerce_bpc.install
Rewrite old tokens to new ones.
commerce_bpc_update_7102 in ./commerce_bpc.install
Fix rewritten tokens.

File

./commerce_bpc.settings.inc, line 71
Helper functions for settings-related functionality.

Code

function commerce_bpc_setting_set($group, $varname, $value, $type = NULL) {
  $varname = 'commerce_bpc_' . $group . '_' . $varname;
  if (!empty($type)) {
    $varname .= '_' . $type;
  }
  variable_set($varname, $value);
}