ClientAreaFeatures.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\App\UI\Admin\ProductConfiguration\Pages\Sections;
  3. use ThurData\Servers\KerioEmail\App\UI\Admin\Custom\Sections\BoxSectionExtended;
  4. use ThurData\Servers\KerioEmail\Core\UI\Interfaces\AdminArea;
  5. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Switcher;
  6. use ThurData\Servers\KerioEmail\Core\UI\Widget\Forms\Sections\HalfPageSection;
  7. /**
  8. *
  9. * Created by PhpStorm.
  10. * User: ThurData
  11. * Date: 10.10.19
  12. * Time: 09:55
  13. * Class ClientAreaFeatures
  14. */
  15. class ClientAreaFeatures extends BoxSectionExtended implements AdminArea
  16. {
  17. protected $id = 'clientAreaFeatures';
  18. protected $name = 'clientAreaFeatures';
  19. protected $title = 'clientAreaFeatures';
  20. public function initContent()
  21. {
  22. $this
  23. ->addSection($this->getLeftSection())
  24. ->addSection($this->getRightSection());
  25. }
  26. /**
  27. * @return HalfPageSection
  28. */
  29. public function getLeftSection()
  30. {
  31. $leftSection = new HalfPageSection('clientAreaFeaturesLeft');
  32. $field = new Switcher('ca_emailAccountPage');
  33. $leftSection->addField($field);
  34. $field = new Switcher('ca_distributionListPage');
  35. $leftSection->addField($field);
  36. $field = new Switcher('ca_goToWebmailPage');
  37. $leftSection->addField($field);
  38. $field = new Switcher('ca_ressourcePage');
  39. $leftSection->addField($field);
  40. return $leftSection;
  41. }
  42. /**
  43. * @return HalfPageSection
  44. */
  45. public function getRightSection()
  46. {
  47. $right = new HalfPageSection('clientAreaFeaturesRight');
  48. $field = new Switcher('ca_emailAliasesPage');
  49. $right->addField($field);
  50. $field = new Switcher('ca_domainAliasesPage');
  51. $right->addField($field);
  52. $field = new Switcher('ca_logInToMailboxButton');
  53. $right->addField($field);
  54. return $right;
  55. }
  56. }