function uc_attribute_option_load in Ubercart 8.4
Same name and namespace in other branches
- 5 uc_attribute/uc_attribute.module \uc_attribute_option_load()
- 6.2 uc_attribute/uc_attribute.module \uc_attribute_option_load()
- 7.3 uc_attribute/uc_attribute.module \uc_attribute_option_load()
Loads an attribute option from the database.
Parameters
int $oid: Option ID to load.
Return value
object The attribute option object.
5 calls to uc_attribute_option_load()
- AttributeTest::testAttributeUiAttributeOptionsDelete in uc_attribute/
tests/ src/ Functional/ AttributeTest.php - Tests the "delete attribute option" user interface.
- AttributeTest::testAttributeUiAttributeOptionsEdit in uc_attribute/
tests/ src/ Functional/ AttributeTest.php - Tests the "edit attribute options" user interface.
- OptionDeleteForm::buildForm in uc_attribute/
src/ Form/ OptionDeleteForm.php - Form constructor.
- OptionEditForm::buildForm in uc_attribute/
src/ Form/ OptionEditForm.php - Form constructor.
- OrderProductHasAttributeOption::doEvaluate in uc_attribute/
src/ Plugin/ Condition/ OrderProductHasAttributeOption.php - Determines if a product in the order has the selected attribute option.
File
- uc_attribute/
uc_attribute.module, line 664 - Ubercart Attribute module.
Code
function uc_attribute_option_load($oid) {
$connection = \Drupal::database();
return $connection
->query("SELECT * FROM {uc_attribute_options} WHERE oid = :oid", [
':oid' => $oid,
])
->fetchObject();
}