@@ -69,7 +69,7 @@ public function interactWith(
6969 };
7070
7171 foreach ((array ) $ form ->getData () as $ key => $ entryData ) {
72- $ this ->printEntryHeader ($ key , $ output );
72+ $ this ->printEditEntryHeader ($ key , $ output );
7373 $ prototype ->setData ($ entryData );
7474
7575 $ submittedEntry = $ this ->formInteractor ->interactWith ($ prototype , $ helperSet , $ input , $ output );
@@ -79,7 +79,9 @@ public function interactWith(
7979 }
8080
8181 if ($ form ->getConfig ()->getOption ('allow_add ' )) {
82+ $ key = count ($ submittedData ) - 1 ;
8283 while ($ this ->askIfContinueToAdd ($ helperSet , $ input , $ output )) {
84+ $ this ->printAddEntryHeader (++$ key , $ output );
8385 $ submittedData [] = $ this ->formInteractor ->interactWith ($ prototype , $ helperSet , $ input , $ output );
8486 }
8587 }
@@ -139,7 +141,7 @@ private function printHeader(FormInterface $form, OutputInterface $output)
139141 * @param int $entryNumber
140142 * @param OutputInterface $output
141143 */
142- private function printEntryHeader ($ entryNumber , OutputInterface $ output )
144+ private function printEditEntryHeader ($ entryNumber , OutputInterface $ output )
143145 {
144146 $ output ->writeln (
145147 strtr (
@@ -151,6 +153,22 @@ private function printEntryHeader($entryNumber, OutputInterface $output)
151153 );
152154 }
153155
156+ /**
157+ * @param int $entryNumber
158+ * @param OutputInterface $output
159+ */
160+ private function printAddEntryHeader ($ entryNumber , OutputInterface $ output )
161+ {
162+ $ output ->writeln (
163+ strtr (
164+ '<fieldset>Add entry {entryNumber}</fieldset> ' ,
165+ [
166+ '{entryNumber} ' => $ entryNumber ,
167+ ]
168+ )
169+ );
170+ }
171+
154172 /**
155173 * @param HelperSet $helperSet
156174 * @param InputInterface $input
0 commit comments