src/Ubiquity/controllers/admin/viewers/ModelViewer.php
public function getForm($identifier, $instance) {
		$form = $this->jquery->semantic ()->dataForm ( $identifier, $instance );
		$form->setLibraryId ( "frmEdit" );
		$className = \get_class ( $instance );
		$fields = $this->controller->_getAdminData ()->getFormFieldNames ( $className, $instance );
		$relFields = OrmUtils::getFieldsInRelations_ ( $className );

		$this->setFormFields_ ( $fields, $relFields );
		array_unshift ( $fields, "_message" );
		$form->setFields ( $fields );

		$fieldTypes = OrmUtils::getFieldTypes ( $className );
		$this->setFormFieldsComponent ( $form, $fieldTypes );
		$this->relationMembersInForm ( $form, $instance, $className, $fields, $relFields );
		OrmUtils::setFieldToMemberNames ( $fields, $relFields );
		$form->setCaptions ( $this->getFormCaptions ( $fields, $className, $instance ) );
		$message = $this->getFormTitle ( $form, $instance );
		$form->setCaption ( "_message", $message ["subMessage"] );
		$form->fieldAsMessage ( "_message", [ "icon" => $message ["icon"] ] );
		$instance->_message = $message ["message"];
		$form->setSubmitParams ( $this->controller->_getBaseRoute () . "/update", "#frm-add-update" );
		$form->onGenerateField ( [ $this,'onGenerateFormField' ] );
		return $form;
	}
public function getForm($identifier, $instance) {
		$form = $this->jquery->semantic ()->dataForm ( $identifier, $instance );
		$form->setLibraryId ( "frmEdit" );
		$className = \get_class ( $instance );
		$fields = $this->controller->_getAdminData ()->getFormFieldNames ( $className, $instance );
		$relFields = OrmUtils::getFieldsInRelations_ ( $className );

		$this->setFormFields_ ( $fields, $relFields );
		array_unshift ( $fields, "_message" );
		$form->setFields ( $fields );

		$fieldTypes = OrmUtils::getFieldTypes ( $className );
		$this->setFormFieldsComponent ( $form, $fieldTypes );
		$this->relationMembersInForm ( $form, $instance, $className, $fields, $relFields );
		OrmUtils::setFieldToMemberNames ( $fields, $relFields );
		$form->setCaptions ( $this->getFormCaptions ( $fields, $className, $instance ) );
		$message = $this->getFormTitle ( $form, $instance );
		$form->setCaption ( "_message", $message ["subMessage"] );
		$form->fieldAsMessage ( "_message", [ "icon" => $message ["icon"] ] );
		$instance->_message = $message ["message"];
		$form->setSubmitParams ( $this->controller->_getBaseRoute () . "/update", "#frm-add-update" );
		$form->onGenerateField ( [ $this,'onGenerateFormField' ] );
		return $form;
	}
public function getForm ( $ identifier , $ instance ) { $ form = $ this -> jquery -> semantic ( ) -> dataForm ( $ identifier , $ instance ) ; $ form -> setLibraryId ( "frmEdit" ) ; $ className = \ get_class ( $ instance ) ; $ fields = $ this -> controller -> _getAdminData ( ) -> getFormFieldNames ( $ className , $ instance ) ; $ relFields = OrmUtils :: getFieldsInRelations_ ( $ className ) ; $ this -> setFormFields_ ( $ fields , $ relFields ) ; array_unshift ( $ fields , "_message" ) ; $ form -> setFields ( $ fields ) ; $ fieldTypes = OrmUtils :: getFieldTypes ( $ className ) ; $ this -> setFormFieldsComponent ( $ form , $ fieldTypes ) ; $ this -> relationMembersInForm ( $ form , $ instance , $ className , $ fields , $ relFields ) ; OrmUtils :: setFieldToMemberNames ( $ fields , $ relFields ) ; $ form -> setCaptions ( $ this -> getFormCaptions ( $ fields , $ className , $ instance ) ) ; $ message = $ this -> getFormTitle ( $ form , $ instance ) ; $ form -> setCaption ( "_message" , $ message [ "subMessage" ] ) ; $ form -> fieldAsMessage ( "_message" , [ "icon" => $ message [ "icon" ] ] ) ; $ instance -> _message = $ message [ "message" ] ; $ form -> setSubmitParams ( $ this -> controller -> _getBaseRoute ( ) . "/update" , "#frm-add-update" ) ; $ form -> onGenerateField ( [ $ this , 'onGenerateFormField' ] ) ; return $ form ; }
Returns the form for adding or modifying an object

@param string $identifier
@param object $instance the object to add or modify
@return \Ajax\semantic\widgets\dataform\DataForm
Returns the form for adding or modifying an object