You are here

function matrix_handler_field_field::options_form in Matrix field 8.2

Same name in this branch
  1. 8.2 views/views_handler_field_field_matrix.inc \matrix_handler_field_field::options_form()
  2. 8.2 src/matrix_handler_field_field.php \Drupal\matrix\matrix_handler_field_field::options_form()

File

src/matrix_handler_field_field.php, line 73

Class

matrix_handler_field_field
A field that displays fields.

Namespace

Drupal\matrix

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  unset($form['delta']);
  $form['message'] = array(
    '#type' => 'markup',
    '#markup' => '<p>' . t('To only show one value (rather than the entire matrix) choose the cell below.') . '</p>',
  );
  $form['row'] = array(
    '#title' => t('Row'),
    '#type' => 'select',
    '#options' => $this
      ->row_list(),
    '#default_value' => $this->options['row'],
    '#description' => t('The row to select the data from'),
  );
  $form['show_row_headers'] = array(
    '#type' => 'checkbox',
    '#title' => t("Output the table's header row labels?"),
    '#default_value' => $this->options['show_row_headers'],
  );
  $form['col'] = array(
    '#title' => t('Column'),
    '#type' => 'select',
    '#options' => $this
      ->col_list(),
    '#default_value' => $this->options['col'],
    '#description' => t('The col to select the data from'),
  );
  $form['show_col_headers'] = array(
    '#type' => 'checkbox',
    '#title' => t("Output the table's left column labels?"),
    '#default_value' => $this->options['show_col_headers'],
  );
}