CloudInitScriptContainter.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. namespace ModulesGarden\ProxmoxAddon\App\UI\CloudInitScriptCreate\Pages;
  3. use ModulesGarden\ProxmoxAddon\App\Models\CloudInitScript;
  4. use ModulesGarden\ProxmoxAddon\App\UI\CloudInitScriptCreate\Providers\CloudInitScriptProvider;
  5. use ModulesGarden\ProxmoxAddon\App\UI\CloudInitScriptCreate\Sections\GeneralSection;
  6. use ModulesGarden\ProxmoxAddon\App\UI\CloudInitScriptCreate\Sections\VariableSection;
  7. use ModulesGarden\ProxmoxAddon\Core\Helper\BuildUrl;
  8. use ModulesGarden\ProxmoxAddon\Core\UI\Interfaces\AdminArea;
  9. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Buttons\ButtonRedirect;
  10. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\DataTable\Column;
  11. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\DataTable\DataProviders\Providers\QueryDataProvider;
  12. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\DataTable\DataTable;
  13. use ModulesGarden\ProxmoxAddon\Core\UI\Widget\Forms\BaseStandaloneFormExtSections;
  14. class CloudInitScriptContainter extends BaseStandaloneFormExtSections implements AdminArea
  15. {
  16. protected $id = 'cloudInitScriptContainter';
  17. protected $name = 'cloudInitScriptContainter';
  18. protected $title = 'cloudInitScriptContainter';
  19. public function initContent()
  20. {
  21. $this->setProvider(new CloudInitScriptProvider());
  22. $this->setFormType('update');
  23. //General
  24. $section = new GeneralSection('general');
  25. $section->initContent();
  26. $this->addSection($section);
  27. //variable
  28. $section = new VariableSection('variable');
  29. $section->initContent();
  30. $this->addSection($section);
  31. $this->loadDataToForm();
  32. }
  33. }