| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- <?php defined('BX_DOL') or die('hack attempt');
- /**
- * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * CC-BY License - http://creativecommons.org/licenses/by/3.0/
- *
- * @defgroup BaseGeneral Base classes for modules
- * @ingroup DolphinModules
- *
- * @{
- */
- bx_import('BxDolModuleTemplate');
- /**
- * Module representation.
- */
- class BxBaseModGeneralTemplate extends BxDolModuleTemplate
- {
- protected $MODULE;
- function __construct(&$oConfig, &$oDb)
- {
- parent::__construct($oConfig, $oDb);
- $this->addCss ('main.css');
- }
- public function getJsCode($sType, $aParams = array(), $bWrap = true)
- {
- $sBaseUri = $this->_oConfig->getBaseUri();
- $sJsClass = $this->_oConfig->getJsClass($sType);
- $sJsObject = $this->_oConfig->getJsObject($sType);
- $aParams = array_merge(array(
- 'sActionUri' => $sBaseUri,
- 'sActionUrl' => BX_DOL_URL_ROOT . $sBaseUri,
- 'sObjName' => $sJsObject,
- 'aHtmlIds' => array(),
- 'oRequestParams' => array()
- ), $aParams);
- $sContent = "var " . $sJsObject . " = new " . $sJsClass . "(" . json_encode($aParams) . ");";
- return !$bWrap ? $sContent : $this->_wrapInTagJsCode($sContent);
- }
- }
- /** @} */
|