Advertisement
Guest User

Untitled

a guest
Feb 26th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. <?php
  2.  
  3. namespace Acme\Bundle\ContractBundle\Admin;
  4.  
  5. use Sonata\AdminBundle\Admin\Admin;
  6. use Sonata\AdminBundle\Form\FormMapper;
  7.  
  8. use Symfony\Component\Security\Core\SecurityContextInterface;
  9.  
  10. class ContractAdmin extends Admin
  11. {
  12. protected function configureFormFields(FormMapper $formMapper)
  13. {
  14. $formMapper
  15. ->with('General')
  16. ->add('number', 'text')
  17. ->add('branch', 'sonata_type_model_autocomplete', array(
  18. 'property' => 'name',
  19. 'minimum_input_length' => 2
  20. ))
  21. ->end()
  22. ;
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement