You are here

function uc_product_feature_load_multiple in Ubercart 8.4

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

Loads all product feature for a node.

Parameters

int $nid: The product node ID.

Return value

array The array of all product features object.

2 calls to uc_product_feature_load_multiple()
ProductFeaturesController::featuresOverview in uc_product/src/Controller/ProductFeaturesController.php
Displays the product features tab on a product node edit form.
uc_product_node_delete in uc_product/uc_product.module
Implements hook_node_delete().

File

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

Code

function uc_product_feature_load_multiple($nid) {
  $connection = \Drupal::database();
  $features = $connection
    ->query('SELECT * FROM {uc_product_features} WHERE nid = :nid ORDER BY pfid ASC', [
    ':nid' => $nid,
  ])
    ->fetchAllAssoc('pfid');
  return $features;
}