Skip to content

Commit 87db4b3

Browse files
author
MartkCz
committed
getForm is deprecated
1 parent 9c901e1 commit 87db4b3

2 files changed

Lines changed: 11 additions & 3 deletions

File tree

src/Wizard.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public function setStep($step) {
107107
/**
108108
* @return Form
109109
*/
110-
protected function getForm() {
110+
protected function createForm() {
111111
if ($this->factory) {
112112
$form = $this->factory->create();
113113
} else {
@@ -117,6 +117,14 @@ protected function getForm() {
117117
return $form;
118118
}
119119

120+
/**
121+
* @return Form
122+
* @deprecated
123+
*/
124+
protected function getForm() {
125+
return $this->createForm();
126+
}
127+
120128
/**
121129
* @param SubmitButton $button
122130
*/

tests/includes/Wizard.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ protected function finish() {
1818
}
1919

2020
protected function createStep1() {
21-
$form = $this->getForm();
21+
$form = $this->createForm();
2222

2323
$form->addText('name', 'Uživatelské jméno')
2424
->setRequired();
@@ -29,7 +29,7 @@ protected function createStep1() {
2929
}
3030

3131
protected function createStep2() {
32-
$form = $this->getForm();
32+
$form = $this->createForm();
3333

3434
$form->addText('email', 'Email')
3535
->setRequired();

0 commit comments

Comments
 (0)