function views_handler_field_links::options_form

Overrides views_handler_field::options_form

2 calls to views_handler_field_links::options_form()
views_handler_field_contextual_links::options_form in handlers/views_handler_field_contextual_links.inc
Default options form provides the label widget that all fields should have.
views_handler_field_ctools_dropdown::options_form in handlers/views_handler_field_ctools_dropdown.inc
Default options form provides the label widget that all fields should have.
2 methods override views_handler_field_links::options_form()
views_handler_field_contextual_links::options_form in handlers/views_handler_field_contextual_links.inc
Default options form provides the label widget that all fields should have.
views_handler_field_ctools_dropdown::options_form in handlers/views_handler_field_ctools_dropdown.inc
Default options form provides the label widget that all fields should have.

File

handlers/views_handler_field_links.inc, line 31

Class

views_handler_field_links
A abstract handler which provides a collection of links.

Code

public function options_form(&$form, &$form_state) {
    parent::options_form($form, $form_state);
    $all_fields = $this->view->display_handler
        ->get_field_labels();
    // Offer to include only those fields that follow this one.
    $field_options = array_slice($all_fields, 0, array_search($this->options['id'], array_keys($all_fields)));
    $form['fields'] = array(
        '#type' => 'checkboxes',
        '#title' => t('Fields'),
        '#description' => t('Fields to be included as links.'),
        '#options' => $field_options,
        '#default_value' => $this->options['fields'],
        '#required' => TRUE,
    );
    $form['check_access'] = array(
        '#type' => 'checkbox',
        '#title' => t('Evaluate router path for access'),
        '#default_value' => $this->options['check_access'],
        '#description' => t('Will check if the path exists and is accessible for the current user. Might be useful, might be slow.'),
    );
    $form['destination'] = array(
        '#type' => 'checkbox',
        '#title' => t('Include destination'),
        '#description' => t('Include a "destination" parameter in the link to return the user to the original view upon completing the link action.'),
        '#default_value' => $this->options['destination'],
    );
}