Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kohinos
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cooperatic-mlc
kohinos
Commits
1984c318
Commit
1984c318
authored
Sep 28, 2020
by
Mathieu Poisbeau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix #180
parent
ed1727e0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
2 deletions
+13
-2
UserPrestataireController.php
src/Controller/UserPrestataireController.php
+6
-1
FormFactory.php
src/Factory/FormFactory.php
+7
-1
No files found.
src/Controller/UserPrestataireController.php
View file @
1984c318
...
...
@@ -56,7 +56,12 @@ class UserPrestataireController extends FluxController
*/
public
function
groupePrestataireInscriptionAction
(
Request
$request
)
{
$form
=
$this
->
createForm
(
GroupePrestataireInscriptionFormType
::
class
,
$this
->
session
->
get
(
'_prestagere'
));
//#180: at this point, the Prestataire entity is detached from the EntityManager (because we get it from the session)
$presta
=
$this
->
session
->
get
(
'_prestagere'
);
//#180: $presta now refers to the fully managed copy returned by the merge operation.
$presta
=
$this
->
em
->
merge
(
$presta
);
$form
=
$this
->
createForm
(
GroupePrestataireInscriptionFormType
::
class
,
$presta
);
$form
->
handleRequest
(
$request
);
if
(
$form
->
isSubmitted
()
&&
$form
->
isValid
())
{
...
...
src/Factory/FormFactory.php
View file @
1984c318
...
...
@@ -134,7 +134,13 @@ class FormFactory
if
(
empty
(
$user
)
||
empty
(
$this
->
session
->
get
(
'_prestagere'
)))
{
throw
new
\Exception
(
"[FORM 6] Opération impossible !"
);
}
$form
=
$this
->
ff
->
create
(
GroupePrestataireInscriptionFormType
::
class
,
$this
->
session
->
get
(
'_prestagere'
),
array
(
'action'
=>
$this
->
router
->
generate
(
'groupeprestataire_inscription'
)));
//#180: at this point, the Prestataire entity is detached from the EntityManager (because we get it from the session)
$presta
=
$this
->
session
->
get
(
'_prestagere'
);
//#180: $presta now refers to the fully managed copy returned by the merge operation.
$presta
=
$this
->
em
->
merge
(
$presta
);
$form
=
$this
->
ff
->
create
(
GroupePrestataireInscriptionFormType
::
class
,
$presta
,
array
(
'action'
=>
$this
->
router
->
generate
(
'groupeprestataire_inscription'
)));
return
$form
->
createView
();
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment