You are here

public function CourseObject::optionsValidate in Course 6

Same name and namespace in other branches
  1. 7.2 includes/CourseObject.inc \CourseObject::optionsValidate()
  2. 7 includes/CourseObject.inc \CourseObject::optionsValidate()

Validate?

Overrides CourseHandler::optionsValidate

1 method overrides CourseObject::optionsValidate()
CourseObjectNode::optionsValidate in includes/course_object.core.inc
Validate the options form. Check the node type.

File

includes/course_object.core.inc, line 353

Class

CourseObject
Parent abstract base class of all course objects.

Code

public function optionsValidate(&$form, &$form_state) {

  // Pass validation to plugins.
  ctools_include('plugins');
  foreach (ctools_get_plugins('course', 'access') as $key => $plugin) {
    $values =& $form_state['values']['plugins']['access'][$key];
    $class = ctools_plugin_get_class($plugin, 'handler');
    $instance = new $class($values);
    $instance
      ->optionsValidate($form['plugins']['access'][$key], $form_state['values']['plugins']['access'][$key]);
  }
}