FormContractorInterface.php 1.2 KB

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