$params["testform"]=$employeeForm->createView();$params["testform"]->getChild('role')->getChild(1)->set('read_only',true);
其他可参考Symfony\Component\Form\FormView