Validate the options form.
Overrides HandlerBase::validateOptionsForm
public function validateOptionsForm(&$form, &$form_state) {
if (empty($form_state['values']['options'])) {
return;
}
// Let the plugins do validation.
$default_id = $form_state['values']['options']['default_argument_type'];
$plugin = $this
->get_plugin('argument_default', $default_id);
if ($plugin) {
$plugin
->validateOptionsForm($form['argument_default'][$default_id], $form_state, $form_state['values']['options']['argument_default'][$default_id]);
}
// summary plugin
$summary_id = $form_state['values']['options']['summary']['format'];
$plugin = $this
->get_plugin('style', $summary_id);
if ($plugin) {
$plugin
->validateOptionsForm($form['summary']['options'][$summary_id], $form_state, $form_state['values']['options']['summary']['options'][$summary_id]);
}
$validate_id = $form_state['values']['options']['validate']['type'];
$plugin = $this
->get_plugin('argument_validator', $validate_id);
if ($plugin) {
$plugin
->validateOptionsForm($form['validate']['options'][$default_id], $form_state, $form_state['values']['options']['validate']['options'][$validate_id]);
}
}