Beispiel #1
0
 /**
  * Prints the single-button form used to request the add action for a record type.
  */
 public function print_add_button()
 {
     global $OUTPUT;
     $id = required_param('id', PARAM_INT);
     $targetpage = new usersetpage(array('action' => 'add', 'parent' => $id));
     if (!$targetpage->can_do('add')) {
         return;
     }
     $addbutton = $OUTPUT->single_button($targetpage->url, get_string("add_{$this->data_class}", 'local_elisprogram'), 'get');
     echo html_writer::tag('div', $addbutton, array('style' => 'text-align: center'));
 }