function flag_handler_filter_flagged::options_form in Flag 7.2
Same name and namespace in other branches
- 6.2 includes/flag_handler_filter_flagged.inc \flag_handler_filter_flagged::options_form()
- 6 includes/flag_handler_filter_flagged.inc \flag_handler_filter_flagged::options_form()
- 7.3 includes/views/flag_handler_filter_flagged.inc \flag_handler_filter_flagged::options_form()
Provide the basic form which calls through to subforms.
If overridden, it is best to call through to the parent, or to at least make sure all of the functions in this form are called.
Overrides views_handler_filter::options_form
File
- includes/
flag_handler_filter_flagged.inc, line 20 - Contains the flagged content filter handler.
Class
- flag_handler_filter_flagged
- Handler to filter for content that has not been flagged.
Code
function options_form(&$form, &$form_state) {
parent::options_form($form, $form_state);
$form['value']['#type'] = 'radios';
$form['value']['#title'] = t('Status');
$form['value']['#options'] = array(
1 => t('Flagged'),
0 => t('Not flagged'),
'All' => t('All'),
);
$form['value']['#default_value'] = empty($this->options['value']) ? '0' : $this->options['value'];
$form['value']['#description'] = '<p>' . t('This filter is only needed if the relationship used has the "Include only flagged content" option <strong>unchecked</strong>. Otherwise, this filter is useless, because all records are already limited to flagged content.') . '</p><p>' . t('By choosing <em>Not flagged</em>, it is possible to create a list of content <a href="@unflagged-url">that is specifically not flagged</a>.', array(
'@unflagged-url' => 'http://drupal.org/node/299335',
)) . '</p>';
}