function farm_plan_plugin_argument_validate_farm_plan::options_form in farmOS 7
Provide the default form for setting options.
Overrides views_plugin_argument_validate::options_form
File
- modules/
farm/ farm_plan/ views/ plugins/ farm_plan_plugin_argument_validate_farm_plan.inc, line 18 - Contains the 'farm plan' argument validator plugin.
Class
- farm_plan_plugin_argument_validate_farm_plan
- Validate whether an argument is an acceptable farm_plan entity.
Code
function options_form(&$form, &$form_state) {
$types = farm_plan_types();
$options = array();
foreach ($types as $type => $definition) {
$options[$type] = check_plain($definition->label);
}
$form['types'] = array(
'#type' => 'checkboxes',
'#title' => t('Plan types'),
'#options' => $options,
'#default_value' => $this->options['types'],
'#description' => t('If you wish to validate for specific plan types, check them; if none are checked, all plans will pass.'),
);
}