StepInterface.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Bundle\WebConfiguratorBundle\Step;
  11. use Symfony\Component\Form\FormContext;
  12. /**
  13. * StepInterface.
  14. *
  15. * @author Marc Weistroff <marc.weistroff@sensio.com>
  16. */
  17. interface StepInterface
  18. {
  19. /**
  20. * __construct
  21. *
  22. * @param array $parameters
  23. */
  24. function __construct(array $parameters);
  25. /**
  26. * Returns the form used for configuration.
  27. *
  28. * @param FormContext $context
  29. * @return Symfony\Component\Form\Form
  30. */
  31. function getForm(FormContext $context);
  32. /**
  33. * Checks for requirements.
  34. *
  35. * @return array
  36. */
  37. function checkRequirements();
  38. /**
  39. * Checks for optional setting it could be nice to have.
  40. *
  41. * @return array
  42. */
  43. function checkOptionalSettings();
  44. /**
  45. * Returns the template to be renderer for this step.
  46. *
  47. * @return string
  48. */
  49. function getTemplate();
  50. /**
  51. * Updates form data parameters.
  52. *
  53. * @param array $parameters
  54. * @return array
  55. */
  56. function update(StepInterface $data);
  57. }