BxBaseStudioGrid.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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 DolphinView Dolphin Studio Representation classes
  7. * @ingroup DolphinStudio
  8. * @{
  9. */
  10. defined('BX_DOL') or die('hack attempt');
  11. bx_import('BxDolStudioGrid');
  12. class BxBaseStudioGrid extends BxDolStudioGrid {
  13. function __construct($aOptions, $oTemplate = false) {
  14. parent::__construct($aOptions, $oTemplate);
  15. }
  16. function getJsObject() {
  17. return '';
  18. }
  19. protected function _getItem($sDbMethod = '')
  20. {
  21. $aIds = bx_get('ids');
  22. if(!$aIds || !is_array($aIds)) {
  23. $iId = (int)bx_get('id');
  24. if(!$iId)
  25. return false;
  26. $aIds = array($iId);
  27. }
  28. $iId = $aIds[0];
  29. $aItem = array();
  30. $this->oDb->$sDbMethod(array('type' => 'by_id', 'value' => $iId), $aItem, false);
  31. if(!is_array($aItem) || empty($aItem))
  32. return false;
  33. return $aItem;
  34. }
  35. }
  36. /** @} */