1
0

BxBaseLanguagesServices.php 798 B

123456789101112131415161718192021222324252627282930313233
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup DolphinCore Dolphin Core
  7. * @{
  8. */
  9. /**
  10. * System services related to Languages.
  11. */
  12. class BxBaseLanguagesServices extends BxDol {
  13. public function __construct() {
  14. parent::__construct();
  15. }
  16. public function serviceGetLanguages($bIdAsKey = false, $bActiveOnly = false) {
  17. bx_import('BxDolLanguages');
  18. $aValues = BxDolLanguages::getInstance()->getLanguages($bIdAsKey, $bActiveOnly);
  19. $aResult = array();
  20. foreach($aValues as $sKey => $sValue)
  21. $aResult[] = array(
  22. 'key' => $sKey,
  23. 'value' => $sValue
  24. );
  25. return $aResult;
  26. }
  27. }
  28. /** @} */