BxDolStudioWidgets.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. {
  15. protected $aWidgets;
  16. function __construct($mixedPageName)
  17. {
  18. parent::__construct($mixedPageName);
  19. $this->oDb = BxDolStudioWidgetsQuery::getInstance();
  20. $this->aWidgets = array();
  21. if(!$this->bPageMultiple)
  22. $this->oDb->getWidgets(array('type' => 'by_page_id', 'value' => $this->aPage['id']), $this->aWidgets, false);
  23. else
  24. foreach($this->aPage as $sPage => $aPage) {
  25. $this->aWidgets[$sPage] = array();
  26. $this->oDb->getWidgets(array('type' => 'by_page_id', 'value' => $aPage['id']), $this->aWidgets[$sPage], false);
  27. }
  28. }
  29. function isEnabled($aWidget)
  30. {
  31. return true;
  32. }
  33. }
  34. /** @} */