CustomUrlLocatorInterface.php 572 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\UrlRewriteGraphQl\Model\Resolver\UrlRewrite;
  8. /**
  9. * Interface for resolution of custom URLs.
  10. *
  11. * It can be used, for example, to resolve '\' URL path to a 'Home' page.
  12. */
  13. interface CustomUrlLocatorInterface
  14. {
  15. /**
  16. * Resolve URL based on custom rules.
  17. *
  18. * @param string $urlKey
  19. * @return string|null Return null if URL cannot be resolved
  20. */
  21. public function locateUrl($urlKey): ?string;
  22. }