UrlInterface.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Backend\Model;
  7. /**
  8. * @api
  9. * @since 100.0.2
  10. */
  11. interface UrlInterface extends \Magento\Framework\UrlInterface
  12. {
  13. /**
  14. * Secret key query param name
  15. */
  16. const SECRET_KEY_PARAM_NAME = 'key';
  17. /**
  18. * xpath to startup page in configuration
  19. */
  20. const XML_PATH_STARTUP_MENU_ITEM = 'admin/startup/menu_item_id';
  21. /**
  22. * Generate secret key for controller and action based on form key
  23. *
  24. * @param string $routeName
  25. * @param string $controller Controller name
  26. * @param string $action Action name
  27. * @return string
  28. */
  29. public function getSecretKey($routeName = null, $controller = null, $action = null);
  30. /**
  31. * Return secret key settings flag
  32. *
  33. * @return bool
  34. */
  35. public function useSecretKey();
  36. /**
  37. * Enable secret key using
  38. *
  39. * @return \Magento\Backend\Model\UrlInterface
  40. */
  41. public function turnOnSecretKey();
  42. /**
  43. * Disable secret key using
  44. *
  45. * @return \Magento\Backend\Model\UrlInterface
  46. */
  47. public function turnOffSecretKey();
  48. /**
  49. * Refresh admin menu cache etc.
  50. *
  51. * @return \Magento\Backend\Model\UrlInterface
  52. */
  53. public function renewSecretUrls();
  54. /**
  55. * Find admin start page url
  56. *
  57. * @return string
  58. */
  59. public function getStartupPageUrl();
  60. /**
  61. * Set custom auth session
  62. *
  63. * @param \Magento\Backend\Model\Auth\Session $session
  64. * @return \Magento\Backend\Model\UrlInterface
  65. */
  66. public function setSession(\Magento\Backend\Model\Auth\Session $session);
  67. /**
  68. * Return backend area front name, defined in configuration
  69. *
  70. * @return string
  71. */
  72. public function getAreaFrontName();
  73. /**
  74. * Find first menu item that user is able to access
  75. *
  76. * @return string
  77. */
  78. public function findFirstAvailableMenu();
  79. }