BxDolStudioNavigationSets.php 957 B

12345678910111213141516171819202122232425262728293031
  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 UnaStudio UNA Studio
  7. * @{
  8. */
  9. class BxDolStudioNavigationSets extends BxTemplStudioGridNavigation
  10. {
  11. public function __construct ($aOptions, $oTemplate = false)
  12. {
  13. parent::__construct ($aOptions, $oTemplate);
  14. $this->oDb = new BxDolStudioNavigationQuery();
  15. }
  16. protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
  17. {
  18. $sModule = '';
  19. if(strpos($sFilter, $this->sParamsDivider) !== false)
  20. list($sModule, $sFilter) = explode($this->sParamsDivider, $sFilter);
  21. if($sModule != '')
  22. $this->_aOptions['source'] .= $this->oDb->prepareAsString(" AND `module`=?", $sModule);
  23. return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
  24. }
  25. }
  26. /** @} */