submitted() public method

public submitted ( )
Esempio n. 1
0
 function morphologyHook(\Formal\Form $oForm, \Formal\Form\Morphology $oMorpho)
 {
     if ($oForm->submitted()) {
         $bMySQL = intval($oForm->postValue("PROJECT_DB_MYSQL")) === 1;
     } else {
         $bMySQL = PROJECT_DB_MYSQL;
     }
     if ($bMySQL === true) {
         $oMorpho->remove("PROJECT_SQLITE_FILE");
     } else {
         $oMorpho->remove("PROJECT_DB_MYSQL_HOST");
         $oMorpho->remove("PROJECT_DB_MYSQL_DBNAME");
         $oMorpho->remove("PROJECT_DB_MYSQL_USERNAME");
         $oMorpho->remove("PROJECT_DB_MYSQL_PASSWORD");
     }
 }
Esempio n. 2
0
 public function hideMySQLFieldWhenNeeded(\Formal\Form $oForm, \Formal\Form\Morphology $oMorpho)
 {
     if ($oForm->submitted()) {
         $bMySQL = intval($oForm->postValue("PROJECT_DB_MYSQL")) === 1;
     } else {
         $bMySQL = PROJECT_DB_MYSQL;
     }
     if ($bMySQL === TRUE) {
         $oMorpho->remove("PROJECT_SQLITE_FILE");
     } else {
         $oMorpho->remove("PROJECT_DB_MYSQL_HOST");
         $oMorpho->remove("PROJECT_DB_MYSQL_DBNAME");
         $oMorpho->remove("PROJECT_DB_MYSQL_USERNAME");
         $oMorpho->remove("PROJECT_DB_MYSQL_PASSWORD");
     }
 }