SettingButton.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace ThurData\Servers\KerioEmail\Core\UI\Widget\Graphs\Settings;
  3. use ThurData\Servers\KerioEmail\Core\UI\Widget\Buttons\ButtonDatatableModalContextLang;
  4. /**
  5. * Description of SettingButton
  6. *
  7. * @autor ThurData <info@thurdata.ch>
  8. */
  9. class SettingButton extends ButtonDatatableModalContextLang
  10. {
  11. protected $id = 'settingButton';
  12. protected $name = 'settingButton';
  13. protected $title = 'settingButton';
  14. protected $icon = 'lu-btn__icon lu-zmdi lu-zmdi-edit';
  15. protected $configFields = [];
  16. public function initContent()
  17. {
  18. $modal = new SettingModal();
  19. $modal->setConfigFields($this->configFields);
  20. $this->initLoadModalAction($modal);
  21. }
  22. public function addNamespaceScope($namespaceScope = null)
  23. {
  24. $this->namespaceScope = $namespaceScope;
  25. return $this;
  26. }
  27. public function getNamespace()
  28. {
  29. if ($this->namespaceScope)
  30. {
  31. return $this->namespaceScope;
  32. }
  33. return parent::getNamespace();
  34. }
  35. public function setConfigFields($fieldsList = [])
  36. {
  37. if ($fieldsList)
  38. {
  39. $this->configFields = $fieldsList;
  40. }
  41. return $this;
  42. }
  43. }