original_string: public function definition() {
          $mform = $this->_form;
  
          $data = $this->_customdata['data'];
          $options = $this->_customdata['options'];
  
          $mform->addElement('filemanager', 'files_filemanager', get_string('files'), null, $options);
          $mform->addElement('hidden', 'returnurl', $data->returnurl);
          if (isset($data->emaillink)) {
              $emaillink = html_writer::link(new moodle_url('mailto:' . $data->emaillink), $data->emaillink);
              $mform->addElement('static', 'emailaddress', '',
                  get_string('emailtoprivatefiles', 'moodle', $emaillink));
          }
          $mform->setType('returnurl', PARAM_LOCALURL);
  
          $this->add_action_buttons(true, get_string('savechanges'));
  
          $this->set_data($data);
      }
code: public function definition() {
          $mform = $this->_form;
  
          $data = $this->_customdata['data'];
          $options = $this->_customdata['options'];
  
          $mform->addElement('filemanager', 'files_filemanager', get_string('files'), null, $options);
          $mform->addElement('hidden', 'returnurl', $data->returnurl);
          if (isset($data->emaillink)) {
              $emaillink = html_writer::link(new moodle_url('mailto:' . $data->emaillink), $data->emaillink);
              $mform->addElement('static', 'emailaddress', '',
                  get_string('emailtoprivatefiles', 'moodle', $emaillink));
          }
          $mform->setType('returnurl', PARAM_LOCALURL);
  
          $this->add_action_buttons(true, get_string('savechanges'));
  
          $this->set_data($data);
      }
code_tokens: public function definition ( ) { $ mform = $ this -> _form ; $ data = $ this -> _customdata [ 'data' ] ; $ options = $ this -> _customdata [ 'options' ] ; $ mform -> addElement ( 'filemanager' , 'files_filemanager' , get_string ( 'files' ) , null , $ options ) ; $ mform -> addElement ( 'hidden' , 'returnurl' , $ data -> returnurl ) ; if ( isset ( $ data -> emaillink ) ) { $ emaillink = html_writer :: link ( new moodle_url ( 'mailto:' . $ data -> emaillink ) , $ data -> emaillink ) ; $ mform -> addElement ( 'static' , 'emailaddress' , '' , get_string ( 'emailtoprivatefiles' , 'moodle' , $ emaillink ) ) ; } $ mform -> setType ( 'returnurl' , PARAM_LOCALURL ) ; $ this -> add_action_buttons ( true , get_string ( 'savechanges' ) ) ; $ this -> set_data ( $ data ) ; }
docstring: Add elements to this form.
docstring_tokens: Add elements to this form .