File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed
Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,9 @@ saved in the file `/src/Form/EchoForm.php`:
2525<?php
2626namespace App\Form;
2727
28- class EchoForm
28+ use Yiisoft\FormModel\FormModel;
29+
30+ class EchoForm extends FormModel
2931{
3032 private string $message = '';
3133
@@ -36,6 +38,12 @@ class EchoForm
3638}
3739```
3840
41+ To inherit from ` FormModel ` you need to install ` form-model ` by following commands:
42+
43+ ```
44+ composer require yiisoft/form-model
45+ ```
46+
3947The ` EchoForm ` class has ` $message ` property and related getter.
4048
4149## Using the form <span id =" using-form " ></span >
@@ -274,12 +282,6 @@ class EchoForm
274282 {
275283 return $this->message;
276284 }
277-
278- public function getFormName()
279- {
280- return (new \ReflectionClass($this))->getShortName();
281- }
282-
283285}
284286```
285287
You can’t perform that action at this time.
0 commit comments