ClientAreaFeatures.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?php
  2. namespace ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\ProductConfiguration\Pages\Sections;
  3. use ModulesGarden\Servers\ZimbraEmail\App\UI\Admin\Custom\Sections\BoxSectionExtended;
  4. use ModulesGarden\Servers\ZimbraEmail\Core\UI\Interfaces\AdminArea;
  5. use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Fields\Switcher;
  6. use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Sections\HalfPageSection;
  7. /**
  8. *
  9. * Created by PhpStorm.
  10. * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
  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. return $leftSection;
  39. }
  40. /**
  41. * @return HalfPageSection
  42. */
  43. public function getRightSection()
  44. {
  45. $right = new HalfPageSection('clientAreaFeaturesRight');
  46. $field = new Switcher('ca_emailAliasesPage');
  47. $right->addField($field);
  48. $field = new Switcher('ca_domainAliasesPage');
  49. $right->addField($field);
  50. $field = new Switcher('ca_logInToMailboxButton');
  51. $right->addField($field);
  52. return $right;
  53. }
  54. }