Skip to content

Commit da3c2ff

Browse files
committed
minor #1054 [Live][Doc] ComponentWithFormTrait::getFormInstance -> getForm (jcrombez)
This PR was merged into the 2.x branch. Discussion ---------- [Live][Doc] ComponentWithFormTrait::getFormInstance -> getForm Commits ------- 755daaf ComponentWithFormTrait::getFormInstance -> getForm
2 parents b2c00e6 + 755daaf commit da3c2ff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/LiveComponent/doc/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,7 +1386,7 @@ a :ref:`LiveAction <actions>`::
13861386
$this->submitForm();
13871387

13881388
/** @var Post $post */
1389-
$post = $this->getFormInstance()->getData();
1389+
$post = $this->getForm()->getData();
13901390
$entityManager->persist($post);
13911391
$entityManager->flush();
13921392

@@ -1480,7 +1480,7 @@ the form::
14801480
$this->submitForm();
14811481

14821482
// now you can access the latest data
1483-
$post = $this->getFormInstance()->getData();
1483+
$post = $this->getForm()->getData();
14841484
// (same as above)
14851485
$post = $this->initialFormData;
14861486
}
@@ -1516,7 +1516,7 @@ before the form is submitted::
15161516

15171517
// this would *not* work
15181518
// $this->submitForm();
1519-
// $post = $this->getFormInstance()->getData();
1519+
// $post = $this->getForm()->getData();
15201520
// $post->setTitle('... some auto-generated-title');
15211521
}
15221522

0 commit comments

Comments
 (0)