Esempio n. 1
0
 public function buildForm(FormBuilderInterface $builder, array $options)
 {
     $type_view = ZkUserBundle::getContainer()->getParameter('type_view');
     $builder->add('module', 'choice', array('choices' => $type_view, 'label' => 'uv_module', 'translation_domain' => 'address', 'attr' => array('class' => 'span2')))->add('name', null, array('label' => 'uv_name', 'translation_domain' => 'address', 'attr' => array('class' => 'span2')));
     $builder->add('save', 'submit', array('label' => 'Save', 'attr' => array('class' => 'btn btn-primary')));
     if ($this->object->getId()) {
         $builder->get('module')->setDisabled(true);
     }
 }
Esempio n. 2
0
 public function __construct($thisGroup)
 {
     $this->thisGroup = $thisGroup;
     $container = ZkUserBundle::getContainer();
     $this->currentUser = $container->get('security.context')->getToken()->getUser();
 }
Esempio n. 3
0
 /**
  * getCurrentUser
  *
  */
 public function getCurrentUser()
 {
     $container = ZkUserBundle::getContainer();
     $this->currentUser = $container->get('security.context')->getToken()->getUser();
 }