mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +00:00
fix deprecations: use fqcn
This commit is contained in:
parent
bc6716a5fd
commit
d4d14d1a06
@ -186,7 +186,7 @@ class ReportController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
$form = $this->get('form.factory')
|
$form = $this->get('form.factory')
|
||||||
->createNamedBuilder(null, 'form', null, array(
|
->createNamedBuilder(null, FormType::class, null, array(
|
||||||
'method' => 'GET',
|
'method' => 'GET',
|
||||||
'csrf_protection' => false
|
'csrf_protection' => false
|
||||||
))
|
))
|
||||||
@ -345,7 +345,7 @@ class ReportController extends Controller
|
|||||||
*/
|
*/
|
||||||
private function createCreateForm(Report $entity, Person $person, $cFGroup)
|
private function createCreateForm(Report $entity, Person $person, $cFGroup)
|
||||||
{
|
{
|
||||||
$form = $this->createForm('chill_reportbundle_report', $entity, array(
|
$form = $this->createForm(ReportType::class, $entity, array(
|
||||||
'action' => $this->generateUrl('report_create',
|
'action' => $this->generateUrl('report_create',
|
||||||
array('person_id' => $person->getId(),
|
array('person_id' => $person->getId(),
|
||||||
'cf_group_id' => $cFGroup->getId())),
|
'cf_group_id' => $cFGroup->getId())),
|
||||||
@ -430,7 +430,7 @@ class ReportController extends Controller
|
|||||||
*/
|
*/
|
||||||
private function createEditForm(Report $entity)
|
private function createEditForm(Report $entity)
|
||||||
{
|
{
|
||||||
$form = $this->createForm('chill_reportbundle_report', $entity, array(
|
$form = $this->createForm(ReportType::class, $entity, array(
|
||||||
'action' => $this->generateUrl('report_update',
|
'action' => $this->generateUrl('report_update',
|
||||||
array('person_id' => $entity->getPerson()->getId(),
|
array('person_id' => $entity->getPerson()->getId(),
|
||||||
'report_id' => $entity->getId())),
|
'report_id' => $entity->getId())),
|
||||||
|
@ -27,6 +27,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||||||
use Chill\MainBundle\Form\Type\AppendScopeChoiceTypeTrait;
|
use Chill\MainBundle\Form\Type\AppendScopeChoiceTypeTrait;
|
||||||
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
use Chill\MainBundle\Security\Authorization\AuthorizationHelper;
|
||||||
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
use Symfony\Component\Security\Core\Authentication\Token\Storage\TokenStorageInterface;
|
||||||
|
use Symfony\Component\Form\Extension\Core\Type\DateType;
|
||||||
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
use Chill\MainBundle\Templating\TranslatableStringHelper;
|
||||||
use Doctrine\Common\Persistence\ObjectManager;
|
use Doctrine\Common\Persistence\ObjectManager;
|
||||||
use Chill\CustomFieldsBundle\Form\Type\CustomFieldType;
|
use Chill\CustomFieldsBundle\Form\Type\CustomFieldType;
|
||||||
@ -78,7 +79,7 @@ class ReportType extends AbstractType
|
|||||||
{
|
{
|
||||||
$builder
|
$builder
|
||||||
->add('user')
|
->add('user')
|
||||||
->add('date', 'date',
|
->add('date', DateType::class,
|
||||||
array('required' => true, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy'))
|
array('required' => true, 'widget' => 'single_text', 'format' => 'dd-MM-yyyy'))
|
||||||
->add('cFData', CustomFieldType::class,
|
->add('cFData', CustomFieldType::class,
|
||||||
array('attr' => array('class' => 'cf-fields'),
|
array('attr' => array('class' => 'cf-fields'),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user