File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -34,6 +34,9 @@ class Wizard extends Container implements IWizard {
3434 /** @var bool */
3535 private $ isSuccess = FALSE ;
3636
37+ /** @var mixed[] */
38+ private $ finalValues = [];
39+
3740 /**
3841 * @param Session $session
3942 */
@@ -70,6 +73,7 @@ protected function getSection(): SessionSection {
7073 }
7174
7275 private function resetSection (): void {
76+ $ this ->finalValues = $ this ->getValues (TRUE );
7377 $ this ->getSection ()->remove ();
7478 }
7579
@@ -85,11 +89,12 @@ public function getCurrentStep(): int {
8589 * @return array|ArrayHash
8690 */
8791 public function getValues (bool $ asArray = FALSE ) {
88- if ($ asArray ) {
89- return (array ) $ this ->getSection ()[self ::VALUES ];
90- } else {
91- return ArrayHash::from ((array ) $ this ->getSection ()[self ::VALUES ]);
92+ $ values = $ this ->finalValues ;
93+ if (!$ values ) {
94+ $ values = (array ) $ this ->getSection ()[self ::VALUES ];
9295 }
96+
97+ return $ asArray ? $ values : ArrayHash::from ($ values );
9398 }
9499
95100 /**
You can’t perform that action at this time.
0 commit comments