add some phpdoc for form creation explanation

This commit is contained in:
Manuel Raynaud
2013-07-01 11:20:40 +02:00
parent 3b5b29c6e0
commit 0dc10d5097

View File

@@ -77,7 +77,31 @@ abstract class BaseForm {
return $this->form->getForm();
}
/**
*
* in this function you add all the fields you need for your Form.
* Form this you have to call add method on $this->form attribute :
*
* $this->form->add("name", "text")
* ->add("email", "email", array(
* "attr" => array(
* "class" => "field"
* ),
* "label" => "email",
* "constraints" => array(
* new NotBlank()
* )
* )
* )
* ->add('age', 'integer');
*
* @return null
*/
abstract protected function buildForm();
/**
* @return string the name of you form. This name must be unique
*/
abstract public function getName();
}