fix deprecation: no more passing of type instances

This commit is contained in:
nobohan
2018-04-05 11:45:58 +02:00
parent ed00833eb8
commit 478e1c505d
7 changed files with 36 additions and 31 deletions

View File

@@ -25,9 +25,11 @@ namespace Chill\ActivityBundle\Controller;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
use Chill\ActivityBundle\Entity\Activity;
use Symfony\Component\Security\Core\Role\Role;
use Chill\ActivityBundle\Entity\Activity;
use Chill\PersonBundle\Entity\Person;
use Chill\ActivityBundle\Form\ActivityType;
/**
* Activity controller.
@@ -130,7 +132,7 @@ class ActivityController extends Controller
*/
private function createCreateForm(Activity $entity)
{
$form = $this->createForm('chill_activitybundle_activity', $entity,
$form = $this->createForm(ActivityType::class, $entity,
array(
'action' => $this->generateUrl('chill_activity_activity_create', [
'person_id' => $entity->getPerson()->getId(),
@@ -250,7 +252,7 @@ class ActivityController extends Controller
*/
private function createEditForm(Activity $entity)
{
$form = $this->createForm('chill_activitybundle_activity', $entity, array(
$form = $this->createForm(ActivityType::class, $entity, array(
'action' => $this->generateUrl('chill_activity_activity_update',
array(
'id' => $entity->getId(),