BxSnipcartPageEntry.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup Snipcart Snipcart
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. /**
  12. * Entry create/edit pages
  13. */
  14. class BxSnipcartPageEntry extends BxBaseModTextPageEntry
  15. {
  16. public function __construct($aObject, $oTemplate = false)
  17. {
  18. $this->MODULE = 'bx_snipcart';
  19. parent::__construct($aObject, $oTemplate);
  20. }
  21. public function getCode ()
  22. {
  23. if (!$this->_aContentInfo) {
  24. $this->_oTemplate->displayPageNotFound();
  25. exit;
  26. }
  27. $CNF = &$this->_oModule->_oConfig->CNF;
  28. BxDolTemplate::getInstance()->addInjection('injection_head', 'text', $this->_oModule->serviceIncludeCssJs($this->_aContentInfo[$CNF['FIELD_AUTHOR']]));
  29. return parent::getCode();
  30. }
  31. protected function _setSubmenu($aParams)
  32. {
  33. parent::_setSubmenu(array_merge($aParams, array(
  34. 'title' => '',
  35. 'icon' => ''
  36. )));
  37. }
  38. }
  39. /** @} */