public function getDatabaseDataFieldByDataField(DatabaseDataField $paramDatabaseDataField) { return $this->arrayDatabaseDataField[$paramDatabaseDataField->getTableName()][$paramDatabaseDataField->getFieldName()]; }
/** * Retourne l'objet Html associé au champ DataField * @param DatabaseDataField $paramDataField * @param $param * @return AbstractHtmlGlobalElement */ public static function getHtmlObjectFromDataField(DatabaseDataField $paramDataField, $param = FALSE, $param2 = FALSE) { $htmlObject = NULL; $TypeOfHtmlObject = $paramDataField->getFieldTypeOfHtmlObject(); switch ($TypeOfHtmlObject) { case Html::TYPE_OF_OBJECT_CALENDAR: $htmlObject = new DataFieldToHtmlInputCalendar($paramDataField); break; case Html::TYPE_OF_OBJECT_INPUTTEXT: $htmlObject = new DataFieldToHtmlInputText($paramDataField); break; case Html::TYPE_OF_OBJECT_LIST: $htmlObject = new DataFieldToHtmlListSelect($paramDataField); break; case Html::TYPE_OF_OBJECT_BOOLEAN: $htmlObject = new DataFieldToHtmlListBoolean($paramDataField); break; case Html::TYPE_OF_OBJECT_TEXTAREA: $htmlObject = new DataFieldToHtmlTextArea($paramDataField); break; case Html::TYPE_OF_OBJECT_SUBFORM_R1N: $htmlObject = new DataFieldToHtmlSubform_R1N($paramDataField); break; case Html::TYPE_OF_OBJECT_SUBFORM_RNN: $htmlObject = new DataFieldToHtmlSubform_RNN($paramDataField, $param, $param2); break; case Html::TYPE_OF_OBJECT_INPUTNUMBER: $htmlObject = new DataFieldToHtmlInputNumber($paramDataField); break; default: Lib::showMessage("Erreur", "Type d'objet <b>" . $TypeOfHtmlObject . "</b> inconnu." . " Champs concerné:" . $paramDataField->getFieldName() . " ", $redirection); // throw new Exception(); } return $htmlObject; }