Skip to content
Snippets Groups Projects
Unverified Commit fa266dd0 authored by Tobias Reischmann's avatar Tobias Reischmann
Browse files

Added definition() for subplugins to extend from_step_instance

parent 20592602
No related branches found
No related tags found
No related merge requests found
......@@ -98,6 +98,9 @@ class form_step_instance extends \moodleform {
$stepmanager->get_step_instances());
$mform->setType($elementname, PARAM_TEXT);
// Insert the subplugin specific settings.
$this->lib->extend_add_instance_form_definition($mform);
$this->add_action_buttons();
}
......@@ -119,6 +122,9 @@ class form_step_instance extends \moodleform {
$mform->setDefault('subpluginnamestatic',
get_string('pluginname', 'cleanupcoursesstep_' . $subpluginname));
$mform->setDefault('subpluginname', $subpluginname);
// Insert the subplugin specific settings.
$this->lib->extend_add_instance_form_definition_after_data($mform);
}
}
......@@ -75,6 +75,22 @@ abstract class base {
return $settingsvalues;
}
/**
* This method can be overriden, to add form elements to the form_step_instance.
* It is called in definition().
* @param \MoodleQuickForm $mform
*/
public function extend_add_instance_form_definition($mform) {
}
/**
* This method can be overriden, to set default values to the form_step_instance.
* It is called in definition_after_data().
* @param \MoodleQuickForm $mform
*/
public function extend_add_instance_form_definition_after_data($mform) {
}
}
class instance_setting {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment