function uc_product_feature_data in Ubercart 6.2
Same name and namespace in other branches
- 8.4 uc_product/uc_product.module \uc_product_feature_data()
- 5 uc_product/uc_product.module \uc_product_feature_data()
- 7.3 uc_product/uc_product.module \uc_product_feature_data()
Returns data for a product feature, based on the feature ID and array key.
Parameters
$fid: The string ID of the product feature you want to get data from.
$key: The key in the product feature array you want: title, callback, delete, settings.
Return value
The value of the key you specify.
2 calls to uc_product_feature_data()
- uc_product_features in uc_product/
uc_product.admin.inc - Displays the product features tab on a product node edit form.
- uc_product_feature_delete in uc_product/
uc_product.module - Deletes a product feature object.
File
- uc_product/
uc_product.module, line 1909 - The product module for Ubercart.
Code
function uc_product_feature_data($fid, $key) {
static $features;
if (empty($features)) {
foreach (module_invoke_all('product_feature') as $feature) {
$features[$feature['id']] = $feature;
}
}
return $features[$fid][$key];
}