You are here

function activity_views_handler_filter_access::options_form in Activity 7

Same name and namespace in other branches
  1. 6.2 views/activity_views_handler_filter_access.inc \activity_views_handler_filter_access::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

views/views_handler_filters.inc, line 28
Provides the Views Filter Handlers.

Class

activity_views_handler_filter_access
Filters the Activity records to those that are visible to the context user.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  foreach (activity_cache_get('realms') as $realm => $information) {
    $options[$realm] = t($information['name']);
  }
  $form['realms'] = array(
    '#title' => t('Realms'),
    '#type' => 'checkboxes',
    '#description' => t('Choose the realms to filter the Activity rows'),
    '#options' => $options,
    '#default_value' => $this->options['realms'],
    '#required' => TRUE,
  );
}