FormContractorInterface.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 Symfony\Component\Form\FormBuilder;
  13. use Symfony\Component\Form\FormFactoryInterface;
  14. interface FormContractorInterface extends BuilderInterface
  15. {
  16. /**
  17. * @abstract
  18. *
  19. * @param \Symfony\Component\Form\FormFactoryInterface $formFactory
  20. */
  21. public function __construct(FormFactoryInterface $formFactory);
  22. /**
  23. * @abstract
  24. *
  25. * @param string $name
  26. * @param array $options
  27. *
  28. * @return FormBuilder
  29. */
  30. public function getFormBuilder($name, array $options = array());
  31. /**
  32. * @abstract
  33. *
  34. * @param string $type
  35. * @param \Sonata\AdminBundle\Admin\FieldDescriptionInterface $fieldDescription
  36. *
  37. * @return array
  38. */
  39. public function getDefaultOptions($type, FieldDescriptionInterface $fieldDescription);
  40. }