SearchFeatures.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. namespace ModulesGarden\Servers\KerioEmail\App\UI\Admin\ProductConfiguration\Pages\Sections;
  3. use ModulesGarden\Servers\KerioEmail\App\UI\Admin\Custom\Sections\BoxSectionExtended;
  4. use ModulesGarden\Servers\KerioEmail\Core\UI\Interfaces\AdminArea;
  5. use ModulesGarden\Servers\KerioEmail\Core\UI\Widget\Forms\Fields\Switcher;
  6. use ModulesGarden\Servers\KerioEmail\Core\UI\Widget\Forms\Sections\BoxSection;
  7. use ModulesGarden\Servers\KerioEmail\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 SearchFeatures
  15. */
  16. class SearchFeatures extends BoxSectionExtended implements AdminArea
  17. {
  18. protected $id = 'searchFeatures';
  19. protected $name = 'searchFeatures';
  20. protected $title = 'searchFeatures';
  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('kerioFeatureAdvancedSearchEnabled');
  34. $left->addField($field);
  35. $field = new Switcher('kerioFeatureInitialSearchPreferenceEnabled');
  36. $left->addField($field);
  37. return $left;
  38. }
  39. /**
  40. * @return HalfPageSection
  41. */
  42. public function getRightSection()
  43. {
  44. $right = new HalfPageSection('right');
  45. $field = new Switcher('kerioFeatureSavedSearchesEnabled');
  46. $right->addField($field);
  47. $field = new Switcher('kerioFeaturePeopleSearchEnabled');
  48. $right->addField($field);
  49. return $right;
  50. }
  51. }