BxOAuthStudioPage.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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 OAuth2 OAuth2 server
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxOAuthStudioPage extends BxTemplStudioModule
  12. {
  13. protected $oModule;
  14. function __construct($sModule, $mixedPageName, $sPage = "")
  15. {
  16. parent::__construct($sModule, $mixedPageName, $sPage);
  17. $this->oModule = BxDolModule::getInstance('bx_oauth');
  18. $this->aMenuItems = array(
  19. 'settings' => array('name' => 'settings', 'icon' => 'cogs', 'title' => '_adm_lmi_cpt_settings'),
  20. 'keys' => array('name' => 'keys', 'icon' => 'key', 'title' => '_adm_lmi_cpt_keys'),
  21. 'help' => array('name' => 'help', 'icon' => 'question', 'title' => '_bx_oauth_help'),
  22. );
  23. }
  24. function getKeys ()
  25. {
  26. $this->oModule->_oTemplate->addStudioJs(array('BxDolGrid.js'));
  27. $this->oModule->_oTemplate->addStudioCss(array('grid.css'));
  28. return $this->oModule->studioSettings();
  29. }
  30. function getHelp ()
  31. {
  32. return _t('_bx_oauth_help_text', BX_DOL_URL_ROOT);
  33. }
  34. }
  35. /** @} */