here goes my doubt:
So I created the Form Class acording to the documentation: http://symfony.com/doc/current/book/forms.html#creating-form-classes
// src/AppBundle/Form/Type/TaskType.php
namespace AppBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
class TaskType extends AbstractType
{
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('task')
->add('dueDate', null, array('widget' => 'single_text'))
->add('save', 'submit');
}
public function getName()
{
return 'task';
}
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'AppBundle\Entity\Task',
));
}
}
But I cannot figure out WHERE to put the submit handler. In http://symfony.com/doc/current/book/forms.html#handling-form-submissions puts it in the controller, with everything else, and in (...#forms-and-doctrine) hints you what to do, but it doesn't say anything (or I couldn't find it) about where exactly and how to handle the submission when you are ussing a form class. A little help would be greatly appreciated.
Thank you in advance