Skip to content

Commit

Permalink
Remove extra arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
greg0ire committed Jan 10, 2017
1 parent 54ea626 commit 0c625e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Controller/CRUDController.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public function listAction()
'form' => $formView,
'datagrid' => $datagrid,
'csrf_token' => $this->getCsrfToken('sonata.batch'),
), null, $request);
), null);
}

/**
Expand Down Expand Up @@ -505,7 +505,7 @@ public function createAction()
$isFormValid = $form->isValid();

// persist if the form was valid and if in preview mode the preview was approved
if ($isFormValid && (!$this->isInPreviewMode($request) || $this->isPreviewApproved($request))) {
if ($isFormValid && (!$this->isInPreviewMode() || $this->isPreviewApproved())) {
$this->admin->checkAccess('create', $object);

try {
Expand Down Expand Up @@ -646,7 +646,7 @@ public function historyAction($id = null)
'object' => $object,
'revisions' => $revisions,
'currentRevision' => $revisions ? current($revisions) : false,
), null, $request);
), null);
}

/**
Expand Down Expand Up @@ -900,7 +900,7 @@ public function aclAction($id = null)
'roles' => $aclRoles,
'aclUsersForm' => $aclUsersForm->createView(),
'aclRolesForm' => $aclRolesForm->createView(),
), null, $request);
), null);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Controller/HelperController.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function retrieveFormFieldElementAction(Request $request)

$admin->setSubject($subject);

$formBuilder = $admin->getFormBuilder($subject);
$formBuilder = $admin->getFormBuilder();

$form = $formBuilder->getForm();
$form->handleRequest($request);
Expand Down

0 comments on commit 0c625e4

Please sign in to comment.