public function CourseObjectUbercart::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_uc/ src/ Plugin/ course/ CourseObject/ CourseObjectUbercart.php, line 71
Class
- CourseObjectUbercart
- Plugin annotation @CourseObject( id = "ubercart", label = "Payment", )
Namespace
Drupal\course_uc\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);
}