Просмотр исходного кода

#3360 API module: add some settings or remove setting page in studio

Alex Trofimov 5 лет назад
Родитель
Сommit
17f54dba3d

+ 29 - 0
modules/boonex/api/classes/BxApiStudioPage.php

@@ -0,0 +1,29 @@
+<?php defined('BX_DOL') or die('hack attempt');
+/**
+ * Copyright (c) UNA, Inc - https://una.io
+ * MIT License - https://opensource.org/licenses/MIT
+ *
+ * @defgroup    API API to the UNA backend
+ * @ingroup     UnaModules
+ *
+ * @{
+ */
+
+class BxApiStudioPage extends BxTemplStudioModule
+{
+    function __construct($sModule, $mixedPageName, $sPage = "")
+    {
+        parent::__construct($sModule, $mixedPageName, $sPage);
+
+        $this->aMenuItems = array(
+            'settings' => array('name' => 'settings', 'icon' => 'cogs', 'title' => '_adm_txt_show_help'),
+        );
+    }
+
+    function getSettings ()
+    {
+        return _t('_bx_api_help');
+    }
+}
+
+/** @} */

+ 1 - 0
modules/boonex/api/install/langs/en.xml

@@ -2,6 +2,7 @@
 <resources name="en" flag="gb" title="English">
     <string name="_sys_module_api"><![CDATA[API]]></string>
     <string name="_bx_api"><![CDATA[API]]></string>
+    <string name="_bx_api_help"><![CDATA[This module doesn't provide any functionality to the end user, instead it provides additional API endpoints. It works oly with OAuth2 module.]]></string>
 
     <!-- EMAIL TEMPLATES -->
     <string name="_bx_api_et_txt_name_password_reset"><![CDATA[New password message]]></string>