public function OrderWeightTotal::buildOptionsForm in Ubercart 8.4
Default options form that provides the label widget that all fields should have.
Overrides Weight::buildOptionsForm
File
- uc_order/
src/ Plugin/ views/ field/ OrderWeightTotal.php, line 34
Class
- OrderWeightTotal
- Total weight field handler.
Namespace
Drupal\uc_order\Plugin\views\fieldCode
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($form, $form_state);
$form['weight_units'] = [
'#type' => 'select',
'#title' => $this
->t('Unit of measurement'),
'#default_value' => $this->options['weight_units'],
'#options' => [
'lb' => $this
->t('Pounds'),
'kg' => $this
->t('Kilograms'),
'oz' => $this
->t('Ounces'),
'g' => $this
->t('Grams'),
],
];
}