CalendarFeatures.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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\BoxSection;
  7. use ModulesGarden\Servers\ZimbraEmail\Core\UI\Widget\Forms\Sections\HalfPageSection;
  8. /**
  9. *
  10. * Created by PhpStorm.
  11. * User: Tomasz Bielecki ( tomasz.bi@modulesgarden.com )
  12. * Date: 29.08.19
  13. * Time: 08:34
  14. * Class CalendarFeatures
  15. */
  16. class CalendarFeatures extends BoxSectionExtended implements AdminArea
  17. {
  18. protected $id = 'calendarFeatures';
  19. protected $name = 'calendarFeatures';
  20. protected $title = 'calendarFeatures';
  21. public function initContent()
  22. {
  23. $this
  24. ->addSection($this->getLeftSection())
  25. ->addSection($this->getRightSection());
  26. }
  27. /**
  28. * @return HalfPageSection
  29. */
  30. public function getLeftSection()
  31. {
  32. $left = new HalfPageSection('left');
  33. $field = new Switcher('zimbraFeatureGroupCalendarEnabled');
  34. $left->addField($field);
  35. return $left;
  36. }
  37. /**
  38. * @return HalfPageSection
  39. */
  40. public function getRightSection()
  41. {
  42. $right = new HalfPageSection('right');
  43. $field = new Switcher('zimbraFeatureCalendarReminderDeviceEmailEnabled');
  44. $right->addField($field);
  45. return $right;
  46. }
  47. }