ConfigOptionsListInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\Setup;
  7. use Magento\Framework\App\DeploymentConfig;
  8. /**
  9. * Interface for handling options in deployment configuration tool
  10. */
  11. interface ConfigOptionsListInterface
  12. {
  13. /**
  14. * Gets a list of input options so that user can provide required
  15. * information that will be used in deployment config file
  16. *
  17. * @return Option\AbstractConfigOption[]
  18. */
  19. public function getOptions();
  20. /**
  21. * Creates array of ConfigData objects from user input data.
  22. * Data in these objects will be stored in array form in deployment config file.
  23. *
  24. * @param array $options
  25. * @param DeploymentConfig $deploymentConfig
  26. * @return \Magento\Framework\Config\Data\ConfigData[]
  27. */
  28. public function createConfig(array $options, DeploymentConfig $deploymentConfig);
  29. /**
  30. * Validates user input option values and returns error messages
  31. *
  32. * @param array $options
  33. * @param DeploymentConfig $deploymentConfig
  34. * @return string[]
  35. */
  36. public function validate(array $options, DeploymentConfig $deploymentConfig);
  37. }