You are here

public function farm_inventory_handler_field_asset_inventory_value::options_form in farmOS 7

Default options form provides the label widget that all fields should have.

Overrides views_handler_field::options_form

File

modules/farm/farm_inventory/views/handlers/farm_inventory_handler_field_asset_inventory_value.inc, line 34
Farm asset inventory value field handler.

Class

farm_inventory_handler_field_asset_inventory_value
Filter class which allows to filter by certain bundles of an entity.

Code

public function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);

  // Only include log that are "done".
  $form['done'] = array(
    '#type' => 'checkbox',
    '#title' => t('Only include done logs'),
    '#description' => t('Filters out logs that have not been marked as done.'),
    '#default_value' => !empty($this->options['done']),
  );

  // Allow future logs to be included.
  $form['future'] = array(
    '#type' => 'checkbox',
    '#title' => t('Include future logs'),
    '#description' => t('Finds the last log, even if it is in the future.'),
    '#default_value' => !empty($this->options['future']),
  );
}