function uc_product_feature_data in Ubercart 8.4
Same name and namespace in other branches
- 5 uc_product/uc_product.module \uc_product_feature_data()
- 6.2 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, given a feature ID and array key.
Parameters
string $fid: The string ID of the product feature you want to get data from.
string $key: The key in the product feature array you want: title, callback, delete, settings.
Return value
The value of the key you specify.
5 calls to uc_product_feature_data()
- ProductFeatureDeleteForm::getQuestion in uc_product/
src/ Form/ ProductFeatureDeleteForm.php - Returns the question to ask the user.
- ProductFeaturesController::featureAdd in uc_product/
src/ Controller/ ProductFeaturesController.php - Displays the add feature form.
- ProductFeaturesController::featureEdit in uc_product/
src/ Controller/ ProductFeaturesController.php - Displays the edit feature form.
- ProductFeaturesController::featuresOverview in uc_product/
src/ Controller/ ProductFeaturesController.php - 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 863 - The product module for Ubercart.
Code
function uc_product_feature_data($fid, $key) {
static $features;
if (empty($features)) {
foreach (\Drupal::moduleHandler()
->invokeAll('uc_product_feature') as $feature) {
$features[$feature['id']] = $feature;
}
}
return $features[$fid][$key];
}