BxBaseCategoriesModule.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?php
  2. /**
  3. * @package Dolphin Core
  4. * @copyright Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  5. * @license CC-BY - http://creativecommons.org/licenses/by/3.0/
  6. */
  7. defined('BX_DOL') or die('hack attempt');
  8. // TODO: reconsider almost all functionality in this file, according to new concept it should NOT be separate page with all categories, every module has its own page with tags
  9. bx_import('BxDolPageView');
  10. bx_import('BxBaseCategories');
  11. class BxBaseCategoriesModule extends BxDolPageView
  12. {
  13. var $_sPage;
  14. var $_sTitle;
  15. var $_sUrl;
  16. var $_aParam;
  17. function BxBaseCategoriesModule($aParam, $sTitle, $sUrl)
  18. {
  19. $this->_sPage = 'categ_module';
  20. $this->_sTitle = $sTitle ? $sTitle : _t('_categ_users');
  21. $this->_sUrl = $sUrl;
  22. $this->_aParam = $aParam;
  23. parent::BxDolPageView($this->_sPage);
  24. }
  25. function getBlockCode_Common($iBlockId)
  26. {
  27. $oCateg = new BxBaseCategories();
  28. $oCateg->getTagObjectConfig();
  29. $aParam = array(
  30. 'type' => $this->_aParam['type'],
  31. 'common' => true
  32. );
  33. return $oCateg->display($aParam, $iBlockId, '', true, 1, $this->_sUrl);
  34. }
  35. function getBlockCode_All($iBlockId)
  36. {
  37. $oCateg = new BxBaseCategories();
  38. $oCateg->getTagObjectConfig();
  39. $this->_aParam['common'] = false;
  40. return array(
  41. $oCateg->display($this->_aParam, $iBlockId, '', true, getParam('categ_show_columns'), $this->_sUrl),
  42. array(),
  43. array(),
  44. $this->_sTitle
  45. );
  46. }
  47. }