BxWikiModule.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 Wiki Wiki
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxWikiModule extends BxDolModule
  12. {
  13. function __construct(&$aModule)
  14. {
  15. parent::__construct($aModule);
  16. }
  17. public function serviceGetSafeServices()
  18. {
  19. return array (
  20. 'Contents' => '',
  21. );
  22. }
  23. /**
  24. * @page service Service Calls
  25. * @section bx_wiki Wiki
  26. * @subsection bx_wiki-browse Browse
  27. * @subsubsection bx_wiki-contents contents
  28. *
  29. * @code bx_srv('bx_wiki', 'contents'); @endcode
  30. *
  31. * Wiki contents - list of pages
  32. * @code {{~bx_wiki:contents~}} @endcode
  33. *
  34. * @see BxWikiModule::serviceContents
  35. */
  36. /**
  37. * @ref bx_wiki-contents "contents"
  38. */
  39. public function serviceContents ()
  40. {
  41. if (!($oWiki = BxDolWiki::getObjectInstance($this->getName())))
  42. return '';
  43. return $oWiki->getContents();
  44. }
  45. }
  46. /** @} */