You are here

public function CourseObject::optionsValidate in Course 3.x

Same name and namespace in other branches
  1. 8.3 src/Entity/CourseObject.php \Drupal\course\Entity\CourseObject::optionsValidate()
  2. 8.2 src/Entity/CourseObject.php \Drupal\course\Entity\CourseObject::optionsValidate()

Validate?

Overrides CourseHandler::optionsValidate

2 calls to CourseObject::optionsValidate()
CourseObjectAttendance::optionsValidate in modules/course_attendance/src/Plugin/course/CourseObject/CourseObjectAttendance.php
Check code uniqueness.
CourseObjectNode::optionsValidate in modules/course_content/src/Course/Object/CourseObjectNode.php
Validate the options form. Check the node type.
2 methods override CourseObject::optionsValidate()
CourseObjectAttendance::optionsValidate in modules/course_attendance/src/Plugin/course/CourseObject/CourseObjectAttendance.php
Check code uniqueness.
CourseObjectNode::optionsValidate in modules/course_content/src/Course/Object/CourseObjectNode.php
Validate the options form. Check the node type.

File

src/Entity/CourseObject.php, line 332

Class

CourseObject
Parent abstract base class of all course objects.

Namespace

Drupal\course\Entity

Code

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

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