You are here

function tmgmt_handler_field_tmgmt_job_item_count::options_form in Translation Management Tool 7

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

Overrides views_handler_field::options_form

File

views/handlers/tmgmt_handler_field_tmgmt_job_item_count.inc, line 25
Contains the tmgmt_handler_field_tmgmt_job_item_count field handler.

Class

tmgmt_handler_field_tmgmt_job_item_count
Field handler to show the amount of job items per job.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $options = array(
    '' => t('- All -'),
  );
  $options += tmgmt_job_item_states();
  $form['state'] = array(
    '#title' => t('Job item status'),
    '#description' => t('Count only job items of a certain status.'),
    '#type' => 'select',
    '#options' => $options,
    '#default_value' => $this->options['state'],
  );
}