You are here

function uc_product_feature_load in Ubercart 8.4

Same name and namespace in other branches
  1. 6.2 uc_product/uc_product.module \uc_product_feature_load()
  2. 7.3 uc_product/uc_product.module \uc_product_feature_load()

Loads a product feature object.

@todo Should return an object instead of array.

Parameters

$pfid: The product feature ID.

$fid: Optional. Specify a specific feature id.

Return value

array The product feature array.

3 calls to uc_product_feature_load()
ProductFeatureDeleteForm::buildForm in uc_product/src/Form/ProductFeatureDeleteForm.php
Form constructor.
ProductFeaturesController::featureEdit in uc_product/src/Controller/ProductFeaturesController.php
Displays the edit feature form.
uc_product_feature_delete in uc_product/uc_product.module
Deletes a product feature object.

File

uc_product/uc_product.module, line 933
The product module for Ubercart.

Code

function uc_product_feature_load($pfid) {
  $connection = \Drupal::database();
  $feature = $connection
    ->query('SELECT * FROM {uc_product_features} WHERE pfid = :pfid', [
    ':pfid' => $pfid,
  ])
    ->fetchAssoc();
  return $feature;
}