FormContractorInterface.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /*
  3. * This file is part of the Sonata Project 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. }