Advertisement
Guest User

Untitled

a guest
Jul 29th, 2015
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. /**
  2. * @var DoctrineCommonCollectionsCollection
  3. *
  4. * @ORMManyToMany(targetEntity="BackendCoreBundleEntityBackendUser")
  5. * @ORMJoinTable(name="supplier_manager",
  6. * joinColumns={
  7. * @ORMJoinColumn(name="supplier_id", referencedColumnName="supplier_id")
  8. * },
  9. * inverseJoinColumns={
  10. * @ORMJoinColumn(name="user_id", referencedColumnName="user_id")
  11. * }
  12. * )
  13. */
  14. private $managers;
  15.  
  16. $builder
  17. ->add('name', 'text')
  18. ->add('contact', 'text')
  19. ->add('phone', 'text')
  20. ->add('email', 'email')
  21. ->add('webSite', 'text', array(
  22. 'required' => false
  23. ))
  24. ->add('description', 'textarea', array(
  25. 'required' => false
  26. ))
  27. ->add('managers', 'entity', array(
  28. 'class' => 'BackendCoreBundle:BackendUser',
  29. 'choices' => $this->options['granted_users_obj'], //object type is array
  30. 'multiple' => true,
  31. 'choice_label' => 'printname',
  32. 'required' => false
  33. ))
  34. ->add('btnSave', 'submit', array('label' => 'Сохранить и продолжить'));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement