FormFactoryInterface.php 962 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. declare(strict_types=1);
  3. /**
  4. * @package Grav\Framework\Form
  5. *
  6. * @copyright Copyright (C) 2015 - 2018 Trilby Media, LLC. All rights reserved.
  7. * @license MIT License; see LICENSE file for details.
  8. */
  9. namespace Grav\Framework\Form\Interfaces;
  10. use Grav\Common\Page\Interfaces\PageInterface;
  11. use Grav\Common\Page\Page;
  12. interface FormFactoryInterface
  13. {
  14. /**
  15. * @param Page $page
  16. * @param string $name
  17. * @param array $form
  18. * @return FormInterface|null
  19. * @deprecated 1.6 Use FormFactory::createFormByPage() instead.
  20. */
  21. public function createPageForm(Page $page, string $name, array $form): ?FormInterface;
  22. /**
  23. * Create form using the header of the page.
  24. *
  25. * @param PageInterface $page
  26. * @param string $name
  27. * @param array $form
  28. * @return FormInterface|null
  29. *
  30. public function createFormForPage(PageInterface $page, string $name, array $form): ?FormInterface;
  31. */
  32. }