OpenSource CLI-App to install and handle stuff related to Web-Server
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
675 B

4 years ago
  1. <?php
  2. namespace App\Menus\Nginx;
  3. use PhpSchool\CliMenu\CliMenu;
  4. use App\Facades\NginxVhost;
  5. use App\Facades\NginxVhostFactory;
  6. /**
  7. * Action that override default-action for go back
  8. * reload vhosts
  9. *
  10. * @author Björn Hase, Tentakelfabrik
  11. * @license http://opensource.org/licenses/MIT The MIT License
  12. * @link https://gitea.tentakelfabrik.de/Tentakelfabrik/mcp
  13. *
  14. */
  15. class NginxVhostCancelAction
  16. {
  17. /**
  18. *
  19. * @param CliMenu $menu [description]
  20. * @return [type] [description]
  21. */
  22. public function __invoke(CliMenu $menu): void
  23. {
  24. $parent = $menu->getParent();
  25. $menu->closeThis();
  26. $parent->open();
  27. }
  28. }