1
I’m learning SYMFONY 3.
Last steps I made before the error.:
create crud with Doctrine ORM
create your route
Enter the post page
After loading "Create a new entry" gives the following error.:
Could not load type "Tableless Modelbundle Form Datetimetype"
500 Internal Server Error - Invalidargumentexception
Page "Tableless Modelbundle Form Posttype.php"
namespace Tableless\ModelBundle\Form;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class PostType extends AbstractType
{
/**
* @param FormBuilderInterface $builder
* @param array $options
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('title')
->add('content')
->add('createdAt', 'datetime')
->add('updateAt', 'datetime')
;
}
/**
* @param OptionsResolver $resolver
*/
public function configureOptions(OptionsResolver $resolver)
{
$resolver->setDefaults(array(
'data_class' => 'Tableless\ModelBundle\Entity\Post'
));
}
}
What was done incorrectly?
How can I overcome embarrassment?