| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <?php defined('BX_DOL') or die('hack attempt');
- /**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup Wiki Wiki
- * @ingroup UnaModules
- *
- * @{
- */
- class BxWikiModule extends BxDolModule
- {
- function __construct(&$aModule)
- {
- parent::__construct($aModule);
- }
- public function serviceGetSafeServices()
- {
- return array (
- 'Contents' => '',
- 'MissingTranslations' => '',
- 'OutdatedTranslations' => '',
- );
- }
- /**
- * @page service Service Calls
- * @section bx_wiki Wiki
- * @subsection bx_wiki-macros Macros
- * @subsubsection bx_wiki-contents contents
- *
- * @code bx_srv('bx_wiki', 'contents'); @endcode
- * @code {{~bx_wiki:contents~}} @endcode
- *
- * Wiki contents - list of pages
- *
- * @see BxWikiModule::serviceContents
- */
- /**
- * @ref bx_wiki-contents "contents"
- */
- public function serviceContents ()
- {
- if (!($oWiki = BxDolWiki::getObjectInstance($this->getName())))
- return '';
-
- return $oWiki->getContents();
- }
- /**
- * @page service Service Calls
- * @section bx_wiki Wiki
- * @subsection bx_wiki-macros Macros
- * @subsubsection bx_wiki-missing_translations missing_translations
- *
- * @code bx_srv('bx_wiki', 'missing_translations'); @endcode
- * @code {{~bx_wiki:missing_translations["ru"]~}} @endcode
- *
- * Get list of blocks with missing translations
- * @param $sLang language to get missing translations for
- *
- * @see BxWikiModule::serviceMissingTranslations
- */
- /**
- * @ref bx_wiki-missing_translations "missing_translations"
- */
- public function serviceMissingTranslations ($sLang)
- {
- if (!($oWiki = BxDolWiki::getObjectInstance($this->getName())))
- return '';
-
- return $oWiki->getMissingTranslations($sLang);
- }
- /**
- * @page service Service Calls
- * @section bx_wiki Wiki
- * @subsection bx_wiki-macros Macros
- * @subsubsection bx_wiki-outdated_translations outdated_translations
- *
- * @code bx_srv('bx_wiki', 'outdated_translations'); @endcode
- * @code {{~bx_wiki:outdated_translations["ru"]~}} @endcode
- *
- * Get list of blocks with outdated translations
- * @param $sLang language to get outdated translations for
- *
- * @see BxWikiModule::serviceOutdatedTranslations
- */
- /**
- * @ref bx_wiki-outdated_translations "outdated_translations"
- */
- public function serviceOutdatedTranslations ($sLang)
- {
- if (!($oWiki = BxDolWiki::getObjectInstance($this->getName())))
- return '';
-
- return $oWiki->getOutdatedTranslations($sLang);
- }
- }
- /** @} */
|