ConfigurableOptionUnitSection.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. namespace ModulesGarden\Servers\ProxmoxVps\App\UI\Admin\Product\Sections;
  3. use ModulesGarden\Servers\ProxmoxVps\Core\UI\Interfaces\AdminArea;
  4. use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Fields\Switcher;
  5. use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\BoxSection;
  6. use ModulesGarden\Servers\ProxmoxVps\Core\UI\Widget\Forms\Sections\HalfPageSection;
  7. class ConfigurableOptionUnitSection extends BoxSection implements AdminArea
  8. {
  9. protected $id = 'configurableOptionUnitSection';
  10. protected $name = 'configurableOptionUnitSection';
  11. protected $title = 'configurableOptionUnitSection';
  12. /**
  13. * @var HalfPageSection
  14. */
  15. private $leftSection;
  16. /**
  17. * @var HalfPageSection
  18. */
  19. private $rightSection;
  20. public function initContent()
  21. {
  22. $this->leftSection = new HalfPageSection('leftSectionsdf');
  23. $this->rightSection = new HalfPageSection('rightSectionsdf');
  24. $this->addSection($this->leftSection)
  25. ->addSection($this->rightSection);
  26. $this->initFields();
  27. }
  28. private function initFields()
  29. {
  30. //One User Per VPS
  31. $field = new Switcher('customconfigoption[oneUserPerVps]');
  32. $field->setDescription('tip');
  33. $field->setDefaultValue("on");
  34. $this->leftSection->addField($field);
  35. }
  36. }