Created factory class

This commit is contained in:
Mark Nelson 2017-08-26 13:27:19 +08:00
parent ae90c7ee4a
commit 327750bb38
9 changed files with 82 additions and 32 deletions

View file

@ -86,7 +86,7 @@ if ($data = $mform->get_data()) {
// Set the element variable.
$data->element = $element->element;
// Get an instance of the element class.
if ($e = \mod_customcert\element::instance($data)) {
if ($e = \mod_customcert\element_factory::get_element_instance($data)) {
$e->save_form_elements($data);
}