You are here

public function OrderTotalWeightCondition::productsOptions in Ubercart 8.4

Product options callback.

Return value

array An array of product SKUs.

File

uc_order/src/Plugin/Condition/OrderTotalWeightCondition.php, line 54

Class

OrderTotalWeightCondition
Provides 'Order total weight' condition.

Namespace

Drupal\uc_order\Plugin\Condition

Code

public function productsOptions() {
  $options = [
    'all' => $this
      ->t('- All products -'),
  ];
  $options += $this->database
    ->query('SELECT nid, model FROM {uc_products} ORDER BY model')
    ->fetchAllKeyed();
  return $options;
}