function uc_attribute_option_save in Ubercart 7.3
Same name and namespace in other branches
- 8.4 uc_attribute/uc_attribute.module \uc_attribute_option_save()
- 6.2 uc_attribute/uc_attribute.module \uc_attribute_option_save()
Saves an attribute object to the database.
Parameters
object $option: The attribute option object to save.
Return value
int The integer result from drupal_write_record().
5 calls to uc_attribute_option_save()
- UbercartAttributeTestCase::createAttributeOption in uc_attribute/
tests/ uc_attribute.test - Creates an attribute option.
- UbercartAttributeTestCase::testAttributeUIAttributeOptions in uc_attribute/
tests/ uc_attribute.test - Tests the attribute options user interface.
- UbercartAttributeTestCase::testAttributeUIAttributeOptionsDelete in uc_attribute/
tests/ uc_attribute.test - Tests the "delete attribute option" user interface.
- UbercartAttributeTestCase::testAttributeUIAttributeOptionsEdit in uc_attribute/
tests/ uc_attribute.test - Tests the "edit attribute options" user interface.
- UbercartTaxesTestCase::testInclusiveTaxes in uc_taxes/
tests/ uc_taxes.test
File
- uc_attribute/
uc_attribute.module, line 822 - Ubercart Attribute module.
Code
function uc_attribute_option_save(&$option) {
// Insert or update?
$key = empty($option->oid) ? array() : 'oid';
return drupal_write_record('uc_attribute_options', $option, $key);
}