| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- <?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 TridentCore Trident Core
- * @{
- */
- /**
- * Cover representation.
- * @see BxDolCover
- */
- class BxBaseCover extends BxDolCover
- {
- protected $_bJsCssAdded = false;
- protected $_oTemplate;
- public function __construct ($oTemplate)
- {
- parent::__construct ();
- if ($oTemplate)
- $this->_oTemplate = $oTemplate;
- else
- $this->_oTemplate = BxDolTemplate::getInstance();
- }
- /**
- * Display Cover.
- */
- public function display ()
- {
- if (!$this->_aOptions || !$this->_sTemplateName)
- return $this->_oTemplate->parseHtmlByName($this->_sTemplateNameEmpty, array());
- $this->_addJsCss();
- return $this->_oTemplate->parseHtmlByName($this->_sTemplateName, $this->_aOptions);
- }
- /**
- * Add css/js files which are needed for display and functionality.
- */
- protected function _addJsCss()
- {
- if ($this->_bJsCssAdded)
- return;
- $this->_oTemplate->addCss(array('cover.css'));
- $this->_bJsCssAdded = true;
- }
- }
- /** @} */
|