public function CourseObjectCommerce::optionsSubmit in Course 3.x
Set a specialized instance ID.
Either the course node ID, or another ubercart node ID.
Overrides CourseObject::optionsSubmit
File
- modules/
course_commerce/ src/ Plugin/ course/ CourseObject/ CourseObjectCommerce.php, line 82
Class
- CourseObjectCommerce
- Plugin annotation @CourseObject( id = "commerce", label = "Payment", )
Namespace
Drupal\course_commerce\Plugin\course\CourseObjectCode
public function optionsSubmit(&$form, FormStateInterface $form_state) {
if (isset($form_state['values']['instance'])) {
if (!$form_state['values']['instance']) {
$form_state['values']['instance'] = $this
->getCourse()
->id();
}
}
parent::optionsSubmit($form, $form_state);
}