BxBaseLanguagesServices.php 851 B

123456789101112131415161718192021222324252627282930313233343536
  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 TridentCore Trident Core
  7. * @{
  8. */
  9. /**
  10. * System services related to Languages.
  11. */
  12. class BxBaseLanguagesServices extends BxDol
  13. {
  14. public function __construct()
  15. {
  16. parent::__construct();
  17. }
  18. public function serviceGetLanguages($bIdAsKey = false, $bActiveOnly = false)
  19. {
  20. bx_import('BxDolLanguages');
  21. $aValues = BxDolLanguages::getInstance()->getLanguages($bIdAsKey, $bActiveOnly);
  22. $aResult = array();
  23. foreach($aValues as $sKey => $sValue)
  24. $aResult[] = array(
  25. 'key' => $sKey,
  26. 'value' => $sValue
  27. );
  28. return $aResult;
  29. }
  30. }
  31. /** @} */