ElementVisibilityInterface.php 1005 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Config\Model\Config\Structure;
  7. /**
  8. * Checks visibility status of form elements on Stores > Settings > Configuration page in Admin Panel
  9. * by their paths in the system.xml structure.
  10. * @api
  11. * @since 101.0.0
  12. */
  13. interface ElementVisibilityInterface
  14. {
  15. /**#@+
  16. * Constants of statuses for form elements.
  17. */
  18. const HIDDEN = 'hidden';
  19. const DISABLED = 'disabled';
  20. /**#@-*/
  21. /**
  22. * Check whether form element is disabled by path.
  23. *
  24. * @param string $path The path of form element in the system.xml structure
  25. * @return bool
  26. * @since 101.0.0
  27. */
  28. public function isDisabled($path);
  29. /**
  30. * Check whether form element is hidden in form by path.
  31. *
  32. * @param string $path The path of form element in the system.xml structure
  33. * @return bool
  34. * @since 101.0.0
  35. */
  36. public function isHidden($path);
  37. }