BxBaseLabelsServices.php 743 B

123456789101112131415161718192021222324252627282930313233
  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 UnaBaseView UNA Base Representation Classes
  7. * @{
  8. */
  9. /**
  10. * System services related to Languages.
  11. */
  12. class BxBaseLabelsServices extends BxDol
  13. {
  14. public function __construct()
  15. {
  16. parent::__construct();
  17. }
  18. public function serviceGetLabels($aParams = [])
  19. {
  20. $oLabel = BxDolLabel::getInstance();
  21. $iParentId = isset($aParams['parent_id']) ? (int)$aParams['parent_id'] : 0;
  22. return [
  23. 'system' => $oLabel->getLabelsSystem($iParentId),
  24. 'context' => $oLabel->getLabelsContext()
  25. ];
  26. }
  27. }
  28. /** @} */