mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 05:44:24 +00:00
fix deprecation: no more passing of type instances
This commit is contained in:
parent
68febabd95
commit
f7631af1fd
@ -54,7 +54,7 @@ class AccompanyingPeriodController extends Controller
|
||||
$person->addAccompanyingPeriod(
|
||||
$accompanyingPeriod);
|
||||
|
||||
$form = $this->createForm(new AccompanyingPeriodType(),
|
||||
$form = $this->createForm(AccompanyingPeriodType::class,
|
||||
$accompanyingPeriod, array('period_action' => 'create'));
|
||||
|
||||
$request = $this->getRequest();
|
||||
@ -111,7 +111,7 @@ class AccompanyingPeriodController extends Controller
|
||||
$this->denyAccessUnlessGranted(PersonVoter::UPDATE, $person,
|
||||
'You are not allowed to update this person');
|
||||
|
||||
$form = $this->createForm(new AccompanyingPeriodType(),
|
||||
$form = $this->createForm(AccompanyingPeriodType::class,
|
||||
$accompanyingPeriod, array('period_action' => 'update'));
|
||||
$request = $this->getRequest();
|
||||
|
||||
@ -167,7 +167,7 @@ class AccompanyingPeriodController extends Controller
|
||||
}
|
||||
|
||||
$current = $person->getCurrentAccompanyingPeriod();
|
||||
$form = $this->createForm(new AccompanyingPeriodType(), $current, array(
|
||||
$form = $this->createForm(AccompanyingPeriodType::class, $current, array(
|
||||
'period_action' => 'close'
|
||||
));
|
||||
|
||||
@ -267,7 +267,7 @@ class AccompanyingPeriodController extends Controller
|
||||
|
||||
$accompanyingPeriod = new AccompanyingPeriod(new \DateTime());
|
||||
|
||||
$form = $this->createForm(new AccompanyingPeriodType(),
|
||||
$form = $this->createForm(AccompanyingPeriodType::class,
|
||||
$accompanyingPeriod, array('period_action' => 'open'));
|
||||
|
||||
if ($request->getMethod() === 'POST') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user