| 1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?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
- * @{
- */
- class BxDolStudioFormsCategories extends BxTemplStudioGrid
- {
- protected $sModule;
- protected $_oCategory;
- public function __construct ($aOptions, $oTemplate = false)
- {
- parent::__construct ($aOptions, $oTemplate);
- $this->_sDefaultSortingOrder = 'DESC';
- $this->_oCategory = BxDolCategories::getInstance();
-
- $this->oDb = new BxDolStudioFormsQuery();
- $sModule = bx_get('module');
- if(!empty($sModule)) {
- $this->sModule = bx_process_input($sModule);
- $this->_aQueryAppend['module'] = $this->sModule;
- }
- }
- protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
- {
- $sModule = $this->sModule;
- if(strpos($sFilter, $this->sParamsDivider) !== false)
- list($sModule, $sFilter) = explode($this->sParamsDivider, $sFilter);
- if($sModule != '')
- $this->_aOptions['source'] .= $this->oDb->prepareAsString(" AND `module` = ?", $sModule);
-
- return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
- }
- }
- /** @} */
|