'table', 'fields' => '']) { $outputData = [ 'en' => [ 'first' => 'One', 'second' => 'Two', 'third' => 'Three' ], 'de' => [ 'first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei' ], 'jp' => [ 'first' => 'Ichi', 'second' => 'Ni', 'third' => 'San' ], 'es' => [ 'first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres' ], ]; return new RowsOfFields($outputData); } /** * Demonstrate an alter hook with an option * * @hook alter example:table * @option french Add a row with French numbers. * @usage example:formatters --french */ public function alterFormatters($result, CommandData $commandData) { if ($commandData->input()->getOption('french')) { $result['fr'] = [ 'first' => 'Un', 'second' => 'Deux', 'third' => 'Trois' ]; } return $result; } }