/**
  * Method invoking the hook-methods to generate a form.
  *
  * @param string $strTargetModule
  * @param string $strTargetAction
  * @param string|class_admin_formgenerator $objAdminForm
  *
  * @return string
  */
 public final function generateAdminForm($strTargetModule = "system", $strTargetAction = "systemTasks", $objAdminForm = null)
 {
     $strReturn = "";
     $objAdminForm = $objAdminForm == null ? $this->getAdminForm() : $objAdminForm;
     if ($objAdminForm instanceof class_admin_formgenerator) {
         $objAdminForm->addField(new class_formentry_hidden("", "execute"))->setStrValue("true");
         $objAdminForm->addField(new class_formentry_button("", "systemtask_run"))->setStrLabel($this->objLang->getLang("systemtask_run", "system"))->setStrValue("submit");
         if ($this->bitMultipartform) {
             $objAdminForm->setStrFormEncoding(class_admin_formgenerator::FORM_ENCTYPE_MULTIPART);
         }
         $strLink = class_link::getLinkAdminHref($strTargetModule, $strTargetAction, "task=" . $this->getStrInternalTaskName());
         $strReturn = $objAdminForm->renderForm($strLink, 0);
     } else {
         if ($objAdminForm != "") {
             if ($this->bitMultipartform) {
                 $strReturn .= $this->objToolkit->formHeader(class_link::getLinkAdminHref($strTargetModule, $strTargetAction, "task=" . $this->getStrInternalTaskName()), "taskParamForm", class_admin_formgenerator::FORM_ENCTYPE_MULTIPART);
             } else {
                 $strReturn .= $this->objToolkit->formHeader(class_link::getLinkAdminHref($strTargetModule, $strTargetAction, "task=" . $this->getStrInternalTaskName()), "taskParamForm");
             }
             $strReturn .= $objAdminForm;
             $strReturn .= $this->objToolkit->formInputHidden("execute", "true");
             $strReturn .= $this->objToolkit->formInputSubmit($this->objLang->getLang("systemtask_run", "system"));
             $strReturn .= $this->objToolkit->formClose();
         }
     }
     return $strReturn;
 }
示例#2
0
 /**
  * Use this method to generate a separator / divider to split up
  * the widget in logical sections.
  *
  * @return string
  */
 protected final function widgetSeparator()
 {
     return $this->objToolkit->adminwidgetSeparator();
 }