BxDevForms.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup Developer Developer
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxDevForms extends BxTemplStudioForms
  12. {
  13. protected $oModule;
  14. protected $aParams;
  15. protected $aGridObjects;
  16. function __construct($aParams)
  17. {
  18. parent::__construct(isset($aParams['page']) ? $aParams['page'] : '');
  19. $this->bPageMenuTitle = false;
  20. $this->aParams = $aParams;
  21. $this->sSubpageUrl = $this->aParams['url'] . '&form_page=';
  22. unset(
  23. $this->aMenuItems[BX_DOL_STUDIO_FORM_TYPE_LABELS],
  24. $this->aMenuItems[BX_DOL_STUDIO_FORM_TYPE_CATEGORIES],
  25. $this->aMenuItems[BX_DOL_STUDIO_FORM_TYPE_GROUPS_ROLES]
  26. );
  27. $this->oModule = BxDolModule::getInstance('bx_developer');
  28. $this->aGridObjects = array(
  29. 'forms' => $this->oModule->_oConfig->getObject('grid_forms'),
  30. 'displays' => $this->oModule->_oConfig->getObject('grid_forms_displays'),
  31. 'fields' => $this->oModule->_oConfig->getObject('grid_forms_fields'),
  32. 'pre_lists' => $this->oModule->_oConfig->getObject('grid_forms_pre_lists'),
  33. 'pre_values' => $this->oModule->_oConfig->getObject('grid_forms_pre_values'),
  34. 'search_forms' => $this->oModule->_oConfig->getObject('grid_search_forms'),
  35. 'search_fields' => $this->oModule->_oConfig->getObject('grid_search_forms_fields'),
  36. );
  37. $this->oModule->_oTemplate->addStudioCss(array('forms.css'));
  38. }
  39. }
  40. /** @} */