1
0

BxBasePageWiki.php 968 B

123456789101112131415161718192021222324252627282930313233343536
  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 UnaBaseView UNA Base Representation Classes
  7. * @{
  8. */
  9. /**
  10. * Wiki page
  11. */
  12. class BxBasePageWiki extends BxTemplPage
  13. {
  14. public function __construct($aObject, $oTemplate)
  15. {
  16. parent::__construct($aObject, $oTemplate);
  17. }
  18. protected function _getPageCodeVars ()
  19. {
  20. $aVars = parent::_getPageCodeVars ();
  21. $oWiki = BxDolWiki::getObjectInstance($this->_aObject['module']);
  22. if ($oWiki && $oWiki->isAllowed('add')) {
  23. foreach ($aVars as $sKey => $sCell) {
  24. if (0 !== strncmp('cell_', $sKey, 5))
  25. continue;
  26. $aVars[$sKey] = $sCell . bx_srv('system', 'wiki_add_block', array($oWiki, $this->_sObject, $sKey), 'TemplServiceWiki');
  27. }
  28. }
  29. return $aVars;
  30. }
  31. }
  32. /** @} */