BxDolStudioWidgets.php 1.1 KB

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