public function NumberOfProductsCondition::productsOptions in Ubercart 8.4
Product options callback.
Return value
array An array of product SKUs.
File
- uc_order/
src/ Plugin/ Condition/ NumberOfProductsCondition.php, line 49
Class
- NumberOfProductsCondition
- Provides 'Count of order products' condition.
Namespace
Drupal\uc_order\Plugin\ConditionCode
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;
}