function commerce_price_decimals_formatter_handler_area_line_item_summary_decimals::options_form in Commerce Price Decimals Formatter 7
Default options form that provides the label widget that all fields should have.
Overrides views_handler_area::options_form
File
- includes/
views/ handlers/ commerce_price_decimals_formatter_handler_area_line_item_summary_decimals.inc, line 34 - Defines a line item summary area handler so the summary can be plugged into the View itself.
Class
- commerce_price_decimals_formatter_handler_area_line_item_summary_decimals
- @file Defines a line item summary area handler so the summary can be plugged into the View itself.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
// Add checkboxes for the summary links if any are available.
$options = array();
foreach (commerce_line_item_summary_links() as $name => $link) {
$options[$name] = $link['title'];
}
if (!empty($options)) {
$form['links'] = array(
'#type' => 'checkboxes',
'#title' => t('Links'),
'#description' => t('Select the links you want to appear beneath the summary.'),
'#options' => $options,
'#default_value' => $this->options['links'],
);
}
$form['info'] = array(
'#type' => 'checkboxes',
'#title' => t('Info'),
'#description' => t('Select what info you want displayed in the summary.'),
'#options' => array(
'quantity' => t('Item quantity'),
'total' => t('Total'),
),
'#default_value' => $this->options['info'],
);
$form = array_merge($form, commerce_price_decimals_formatter_get_settings_form($this->options));
}