Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Live][Doc] ComponentWithFormTrait::getFormInstance -> getForm #1054

Merged
merged 1 commit into from
Aug 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/LiveComponent/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ a :ref:`LiveAction <actions>`::
$this->submitForm();

/** @var Post $post */
$post = $this->getFormInstance()->getData();
$post = $this->getForm()->getData();
$entityManager->persist($post);
$entityManager->flush();

Expand Down Expand Up @@ -1480,7 +1480,7 @@ the form::
$this->submitForm();

// now you can access the latest data
$post = $this->getFormInstance()->getData();
$post = $this->getForm()->getData();
// (same as above)
$post = $this->initialFormData;
}
Expand Down Expand Up @@ -1516,7 +1516,7 @@ before the form is submitted::

// this would *not* work
// $this->submitForm();
// $post = $this->getFormInstance()->getData();
// $post = $this->getForm()->getData();
// $post->setTitle('... some auto-generated-title');
}

Expand Down