for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* (c) Lukasz D. Tulikowski <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace App\Form;
use App\Entity\Review;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\DateTimeType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
class ReviewType extends AbstractType
{
/**
* {@inheritdoc}
public function buildForm(FormBuilderInterface $builder, array $options)
$builder
->add('body')
->add('rating')
->add('author')
->add('publicationDate', DateTimeType::class, [
'widget' => 'single_text',
'input' => 'datetime',
]);
}
public function configureOptions(OptionsResolver $resolver)
$resolver->setDefaults([
'data_class' => Review::class,