BxDolStudioNavigationSets.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup DolphinStudio Dolphin Studio
  7. * @{
  8. */
  9. bx_import('BxTemplStudioGridNavigation');
  10. bx_import('BxDolStudioTemplate');
  11. bx_import('BxDolStudioNavigationQuery');
  12. class BxDolStudioNavigationSets extends BxTemplStudioGridNavigation
  13. {
  14. public function __construct ($aOptions, $oTemplate = false)
  15. {
  16. parent::__construct ($aOptions, $oTemplate);
  17. $this->oDb = new BxDolStudioNavigationQuery();
  18. }
  19. protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
  20. {
  21. $sModule = '';
  22. if(strpos($sFilter, $this->sParamsDivider) !== false)
  23. list($sModule, $sFilter) = explode($this->sParamsDivider, $sFilter);
  24. if($sModule != '')
  25. $this->_aOptions['source'] .= $this->oDb->prepare(" AND `module`=?", $sModule);
  26. return parent::_getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
  27. }
  28. }
  29. /** @} */