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
738 B

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
  1. <?php
  2. namespace App\Menus;
  3. use PhpSchool\CliMenu\Builder\CliMenuBuilder;
  4. /**
  5. * Default Styles
  6. *
  7. * @author Björn Hase, Tentakelfabrik
  8. * @license http://opensource.org/licenses/MIT The MIT License
  9. * @link https://gitea.tentakelfabrik.de/Tentakelfabrik/mcp
  10. *
  11. */
  12. class StylesFactory
  13. {
  14. /**
  15. * Adding default styles for menus
  16. *
  17. *
  18. * @param CliMenuBuilder $builder [description]
  19. */
  20. public function setMenuStyles(CliMenuBuilder $builder)
  21. {
  22. $builder->setWidth($builder->getTerminal()->getWidth());
  23. $builder->setBorderLeftWidth(4);
  24. $builder->setBorderColour('magenta');
  25. $builder->setMargin(2);
  26. $builder->setPadding(2, 4);
  27. return $builder;
  28. }
  29. }