| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php defined('BX_DOL') or die('hack attempt');
- /**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup UnaStudio UNA Studio
- * @{
- */
- require_once(BX_DOL_DIR_STUDIO_INC . 'utils.inc.php');
- class BxDolStudioFormsSearchFields extends BxTemplStudioGrid
- {
- protected $sModule = '';
- protected $sForm = '';
- public function __construct ($aOptions, $oTemplate = false)
- {
- parent::__construct ($aOptions, $oTemplate);
- $this->oDb = new BxDolStudioFormsQuery();
- $sModule = bx_get('module');
- if(!empty($sModule)) {
- $this->sModule = bx_process_input($sModule);
- $this->_aQueryAppend['module'] = $this->sModule;
- }
- $sForm = bx_get('form');
- if(!empty($sForm)) {
- $this->sForm = bx_process_input($sForm);
- $this->_aQueryAppend['form'] = $this->sForm;
- }
- }
- protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
- {
- if(empty($this->sForm))
- return array();
- $this->_aOptions['source'] = $this->oDb->prepareAsString($this->_aOptions['source'], $this->sForm);
- return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
- }
- }
- /** @} */
|