fix deprecations: use fqcn

This commit is contained in:
nobohan
2018-04-03 12:25:18 +02:00
parent 16b05d29e5
commit 24357ce3d6
2 changed files with 6 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ class ScopeController extends Controller
*/
private function createCreateForm(Scope $scope)
{
$form = $this->createForm(new ScopeType(), $scope, array(
$form = $this->createForm(ScopeType::class, $scope, array(
'action' => $this->generateUrl('admin_scope_create'),
'method' => 'POST',
));
@@ -80,7 +80,7 @@ class ScopeController extends Controller
public function newAction()
{
$scope = new Scope();
$form = $this->createCreateForm($scope);
$form = $this->createCreateForm($scope);
return $this->render('ChillMainBundle:Scope:new.html.twig', array(
'entity' => $scope,
@@ -138,12 +138,12 @@ class ScopeController extends Controller
*/
private function createEditForm(Scope $scope)
{
$form = $this->createForm(new ScopeType(), $scope, array(
$form = $this->createForm(ScopeType::class, $scope, array(
'action' => $this->generateUrl('admin_scope_update', array('id' => $scope->getId())),
'method' => 'PUT',
));
$form->add('submit', 'submit', array('label' => 'Update'));
$form->add('submit', SubmitType::class, array('label' => 'Update'));
return $form;
}