BxDolStudioWidgets.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  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. defined('BX_DOL') or die('hack attempt');
  10. bx_import('BxTemplStudioPage');
  11. bx_import('BxDolStudioWidgetsQuery');
  12. define('BX_DOL_STUDIO_WS_ENABLED', 1);
  13. define('BX_DOL_STUDIO_WS_DISABLED', 2);
  14. class BxDolStudioWidgets extends BxTemplStudioPage {
  15. protected $aWidgets;
  16. function BxDolStudioWidgets($mixedPageName) {
  17. parent::BxTemplStudioPage($mixedPageName);
  18. $this->oDb = BxDolStudioWidgetsQuery::getInstance();
  19. $this->aWidgets = array();
  20. if(!$this->bPageMultiple)
  21. $this->oDb->getWidgets(array('type' => 'by_page_id', 'value' => $this->aPage['id']), $this->aWidgets, false);
  22. else
  23. foreach($this->aPage as $sPage => $aPage) {
  24. $this->aWidgets[$sPage] = array();
  25. $this->oDb->getWidgets(array('type' => 'by_page_id', 'value' => $aPage['id']), $this->aWidgets[$sPage], false);
  26. }
  27. }
  28. function isEnabled($aWidget) {
  29. return true;
  30. }
  31. }
  32. /** @} */