BxDolTextPageView.php 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. // TODO: decide later what to do with text* classes and module, it looks like they will stay and text modules will be still based on it, but some refactoring is needed
  3. /***************************************************************************
  4. * Dolphin Smart Community Builder
  5. * -----------------
  6. * begin : Mon Mar 23 2006
  7. * copyright : (C) 2006 BoonEx Group
  8. * website : http://www.boonex.com/
  9. * This file is part of Dolphin - Smart Community Builder
  10. *
  11. * Dolphin is free software. This work is licensed under a Creative Commons Attribution 3.0 License.
  12. * http://creativecommons.org/licenses/by/3.0/
  13. *
  14. * Dolphin is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
  15. * without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  16. * See the Creative Commons Attribution 3.0 License for more details.
  17. * You should have received a copy of the Creative Commons Attribution 3.0 License along with Dolphin,
  18. * see license.txt file; if not, write to marketing@boonex.com
  19. ***************************************************************************/
  20. bx_import('BxDolPageView');
  21. bx_import('BxTemplConfig');
  22. class BxDolTextPageView extends BxDolPageView {
  23. var $_sPageName;
  24. var $_sName;
  25. var $_oObject;
  26. function BxDolTextPageView($sPageName, $sName, &$oObject) {
  27. parent::BxDolPageView($sPageName);
  28. $this->_sName = process_db_input($sName, BX_TAGS_STRIP);
  29. $this->_oObject = $oObject;
  30. }
  31. function getBlockCode_Content() {
  32. return $this->_oObject->getBlockView($this->_sName);
  33. }
  34. function getBlockCode_Comment() {
  35. return $this->_oObject->getBlockComment($this->_sName);
  36. }
  37. function getBlockCode_Vote() {
  38. $sContent = $this->_oObject->getBlockVote($this->_sName);
  39. return !empty($sContent) ? array($sContent, array(), array(), false) : '';
  40. }
  41. function getBlockCode_Action() {
  42. return $this->_oObject->getBlockAction($this->_sName);
  43. }
  44. function getBlockCode_SocialSharing() {
  45. return $this->_oObject->getBlockSocialSharing($this->_sName);
  46. }
  47. }
  48. ?>