Skip to content

Commit

Permalink
Update example to demonstrate default-table-fields
Browse files Browse the repository at this point in the history
  • Loading branch information
greg-1-anderson committed Feb 23, 2023
1 parent 68ae487 commit 24ea81f
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/src/Robo/Plugin/Commands/ExampleCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,9 @@ function ($key, $cellData, FormatterOptions $options) {
* first: I
* second: II
* third: III
* fourth: IV
* @default-table-fields first,second,third
* @default-fields first,second,third,fourth
* @default-string-field second
* @usage try:formatters --format=yaml
* @usage try:formatters --format=csv
Expand All @@ -353,10 +356,10 @@ function ($key, $cellData, FormatterOptions $options) {
public function tryFormatters($somthing = 'default', $options = ['format' => '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' ],
'en' => [ 'first' => 'One', 'second' => 'Two', 'third' => 'Three', 'fourth' => 'Four', ],
'de' => [ 'first' => 'Eins', 'second' => 'Zwei', 'third' => 'Drei', 'fourth' => 'Vier', ],
'jp' => [ 'first' => 'Ichi', 'second' => 'Ni', 'third' => 'San', 'fourth' => 'Shi', ],
'es' => [ 'first' => 'Uno', 'second' => 'Dos', 'third' => 'Tres', 'fourth' => 'Quatro', ],
];
return new RowsOfFields($outputData);
}
Expand Down

0 comments on commit 24ea81f

Please sign in to comment.