function uc_dropdown_attributes_class in Dropdown Attributes 7
Same name and namespace in other branches
- 6 dependent_dropdown.inc \uc_dropdown_attributes_class()
Form constructor for the uc_dropdown_attributes classes form.
Administrative form for specifying the attribute dependencies for classes.
Parameters
string $class: The class with the attribute dependencies.
See also
uc_dropdown_attributes_class_submit()
uc_dropdown_attributes_dependent_callback()
theme_uc_dropdown_attributes_class()
1 string reference to 'uc_dropdown_attributes_class'
- uc_dropdown_attributes_menu in ./
uc_dropdown_attributes.module - Implements hook_menu().
File
- ./
dependent_dropdown.inc, line 103 - Administrative interface for specifying the attribute dependencies.
Code
function uc_dropdown_attributes_class($form, &$form_state, $class) {
$attributes = uc_class_get_attributes($class);
$query = 'SELECT aid, parent_aid, parent_values, required
FROM {uc_dropdown_classes} WHERE pcid=:pcid';
$dependencies = db_query($query, array(
':pcid' => $class,
));
_uc_dropdown_attributes_form($form, $form_state, $attributes, $dependencies);
return $form;
}