You are here

public function ActivityActionHandler::optionForm in Activity 7

Display an FAPI form.

Parameters

&$form: An FAPI form array.

$form_state: The form_state from FAPI.

2 calls to ActivityActionHandler::optionForm()
NodeActivityActionHandler::optionForm in ./activity_action_handlers.inc
Display an FAPI form.
UserActivityActionHandler::optionForm in ./activity_action_handlers.inc
Display an FAPI form.
2 methods override ActivityActionHandler::optionForm()
NodeActivityActionHandler::optionForm in ./activity_action_handlers.inc
Display an FAPI form.
UserActivityActionHandler::optionForm in ./activity_action_handlers.inc
Display an FAPI form.

File

./activity_action_handlers.inc, line 107

Class

ActivityActionHandler

Code

public function optionForm(&$form, $form_state) {
  $options = drupal_map_assoc(range(0, 7200, 300), 'format_interval');
  $options[0] = t('Unlimited');
  $form['window'] = array(
    '#type' => 'select',
    '#title' => t('Activity Window'),
    '#description' => t('Prevent repeat Activity from the same user for the same entity within this interval'),
    '#options' => $options,
    '#default_value' => $this->options['window'],
  );
}