| 
4 | 4 | 
 
  | 
5 | 5 | namespace PhpSchool\PhpWorkshop\Factory;  | 
6 | 6 | 
 
  | 
 | 7 | +use PhpSchool\CliMenu\Action\ExitAction;  | 
 | 8 | +use PhpSchool\CliMenu\MenuItem\SelectableItem;  | 
7 | 9 | use PhpSchool\CliMenu\Style\SelectableStyle;  | 
8 | 10 | use PhpSchool\Terminal\Terminal;  | 
9 | 11 | use Psr\Container\ContainerInterface;  | 
@@ -74,7 +76,7 @@ function (CliMenu $menu) use ($exerciseRenderer, $eventDispatcher, $exercise) {  | 
74 | 76 |             ->addLineBreak()  | 
75 | 77 |             ->addItem('HELP', new MenuCommandInvoker($c->get(HelpCommand::class)))  | 
76 | 78 |             ->addItem('CREDITS', new MenuCommandInvoker($c->get(CreditsCommand::class)))  | 
77 |  | -            ->setExitButtonText('EXIT')  | 
 | 79 | +            ->disableDefaultItems()  | 
78 | 80 |             ->setBackgroundColour($c->get('bgColour'))  | 
79 | 81 |             ->setForegroundColour($c->get('fgColour'))  | 
80 | 82 |             ->setMarginAuto()  | 
@@ -110,6 +112,14 @@ function (CliMenu $menu) use ($exerciseRenderer, $eventDispatcher, $exercise) {  | 
110 | 112 |             })  | 
111 | 113 |             ->addLineBreak();  | 
112 | 114 | 
 
  | 
 | 115 | +        $builder->addMenuItem(new SelectableItem('EXIT', new ExitAction()));  | 
 | 116 | + | 
 | 117 | +        if (PHP_OS_FAMILY === 'Darwin') {  | 
 | 118 | +            $builder->addLineBreak();  | 
 | 119 | +            $builder->addItem('www.phpschool.io', function () {  | 
 | 120 | +                exec('open https://www.phpschool.io');  | 
 | 121 | +            });  | 
 | 122 | +        }  | 
113 | 123 | 
 
  | 
114 | 124 |         if (null !== $c->get('workshopTitle')) {  | 
115 | 125 |             $builder->setTitle($c->get('workshopTitle'));  | 
 | 
0 commit comments