InfoForm.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\App\UI\Client\Setting\Forms;
  3. use ThurData\Servers\KerioEmail\App\Traits\FormExtendedTrait;
  4. use ThurData\Servers\KerioEmail\Core\UI\Traits\FormDataProvider;
  5. use ThurData\Servers\KerioEmail\App\UI\Client\Setting\Providers\InfoSettingDataProvider;
  6. use ThurData\Servers\KerioEmail\Core\UI\Interfaces\ClientArea;
  7. use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Forms\SortedFieldForm;
  8. use ThurData\Servers\KerioEmail\App\UI\Client\Setting\Sections\AdditionalSection;
  9. use ThurData\Servers\KerioEmail\App\UI\Client\Setting\Sections\GeneralSection;
  10. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\FormConstants;
  11. use function ThurData\Servers\KerioEmail\Core\Helper\di;
  12. class InfoForm extends SortedFieldForm implements ClientArea
  13. {
  14. use FormExtendedTrait;
  15. use FormDataProvider;
  16. public function initContent()
  17. {
  18. $this->initIds('infoForm');
  19. $this->setFormType(FormConstants::READ);
  20. $this->setProvider(new InfoSettingDataProvider());
  21. $this->initFields();
  22. $this->loadDataToForm();
  23. }
  24. public function getAllowedActions()
  25. {
  26. return ['info'];
  27. }
  28. private function initFields()
  29. {
  30. $this->addSection(new GeneralSection());
  31. $this->addSection(new AdditionalSection());
  32. }
  33. }