ServerSettingsForm.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <?php
  2. /* * ********************************************************************
  3. * Proxmox Product developed. (Dec 7, 2017)
  4. * *
  5. *
  6. * CREATED BY MODULESGARDEN -> http://modulesgarden.com
  7. * CONTACT -> contact@modulesgarden.com
  8. *
  9. *
  10. * This software is furnished under a license and may be used and copied
  11. * only in accordance with the terms of such license and with the
  12. * inclusion of the above copyright notice. This software or any other
  13. * copies thereof may not be provided or otherwise made available to any
  14. * other person. No title to and ownership of the software is hereby
  15. * transferred.
  16. *
  17. *
  18. * ******************************************************************** */
  19. namespace ModulesGarden\ProxmoxAddon\App\UI\ServerSettings\Forms;
  20. use ModulesGarden\ProxmoxAddon\App\UI\ServerSettings\Providers\ServerSettingProvider;
  21. use ModulesGarden\ProxmoxAddon\App\UI\ServerSettings\Sections\ConsoleSection;
  22. use ModulesGarden\ProxmoxAddon\App\UI\ServerSettings\Sections\GeneralSection;
  23. use ModulesGarden\ProxmoxAddon\App\UI\Validators\NumberValidator;
  24. use ModulesGarden\ProxmoxAddon\Core\UI\Interfaces\AdminArea;
  25. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Fields\Hidden;
  26. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Fields\Select;
  27. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Fields\Text;
  28. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Fields\Textarea;
  29. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\FormInTab;
  30. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Sections\HalfPageSection;
  31. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\Sections\RawSection;
  32. class ServerSettingsForm extends FormInTab implements AdminArea
  33. {
  34. protected $id = 'serverSettingsForm';
  35. protected $name = 'serverSettingsForm';
  36. protected $title = 'serverSettingsFormTitle';
  37. public function isRawTitle()
  38. {
  39. return false;
  40. }
  41. public function initContent()
  42. {
  43. $this->unsetShowTitle();
  44. //SettingProvider
  45. $this->setProvider(new ServerSettingProvider());
  46. //general
  47. $generalSection = new GeneralSection();
  48. $generalSection->setMainContainer($this->mainContainer);
  49. $this->addSection($generalSection);
  50. //load form
  51. $this->loadDataToForm();
  52. }
  53. }