GetUtilityPageIdentifiers.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Cms\Model;
  7. use Magento\Cms\Api\GetUtilityPageIdentifiersInterface;
  8. use Magento\Framework\App\Config\ScopeConfigInterface;
  9. use Magento\Store\Model\ScopeInterface;
  10. /**
  11. * Utility Cms Pages.
  12. */
  13. class GetUtilityPageIdentifiers implements GetUtilityPageIdentifiersInterface
  14. {
  15. /**
  16. * @var ScopeConfigInterface
  17. */
  18. private $scopeConfig;
  19. /**
  20. * UtilityCmsPage constructor.
  21. * @param ScopeConfigInterface $scopeConfig
  22. */
  23. public function __construct(
  24. ScopeConfigInterface $scopeConfig
  25. ) {
  26. $this->scopeConfig = $scopeConfig;
  27. }
  28. /**
  29. * Get List Page Identifiers.
  30. *
  31. * @return array
  32. */
  33. public function execute()
  34. {
  35. $homePageIdentifier = $this->scopeConfig->getValue(
  36. 'web/default/cms_home_page',
  37. ScopeInterface::SCOPE_STORE
  38. );
  39. $noRouteIdentifier = $this->scopeConfig->getValue(
  40. 'web/default/cms_no_route',
  41. ScopeInterface::SCOPE_STORE
  42. );
  43. $noCookieIdentifier = $this->scopeConfig->getValue(
  44. 'web/default/cms_no_cookies',
  45. ScopeInterface::SCOPE_STORE
  46. );
  47. return [$homePageIdentifier, $noRouteIdentifier, $noCookieIdentifier];
  48. }
  49. }