FormContractorInterface.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /*
  3. * This file is part of the Sonata package.
  4. *
  5. * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  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 Sonata\AdminBundle\Builder;
  11. use Sonata\AdminBundle\Admin\FieldDescriptionInterface;
  12. use Sonata\AdminBundle\Admin\AdminInterface;
  13. use Sonata\AdminBundle\Model\ModelManagerInterface;
  14. use Symfony\Component\Form\FormBuilder;
  15. use Symfony\Component\Form\FormFactoryInterface;
  16. interface FormContractorInterface
  17. {
  18. /**
  19. * @abstract
  20. * @param \Symfony\Component\Form\FieldFactory\FormFactoryInterface $formFactory
  21. */
  22. function __construct(FormFactoryInterface $formFactory);
  23. /**
  24. * @abstract
  25. * @param \Sonata\AdminBundle\Admin\AdminInterface $admin
  26. * @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
  27. * @return void
  28. */
  29. function fixFieldDescription(AdminInterface $admin, FieldDescriptionInterface $fieldDescription);
  30. /**
  31. * @abstract
  32. * @param string $name
  33. * @param array $options
  34. * @return void
  35. */
  36. function getFormBuilder($name, array $options = array());
  37. }