/** * {@inheritdoc} */ protected function configureFormFields(FormMapper $formMapper) { parent::configureFormFields($formMapper); $roles = ["ROLE_SUPER_ADMIN" => "Super Admin", "ROLE_ADMIN" => "Admin", "ROLE_USER" => "User", "IS_AUTHENTICATED_FULLY" => "Authenticated Fully", "IS_AUTHENTICATED_REMEMBERED" => "Authenticated Remembered", "IS_AUTHENTICATED_ANONYMOUSLY" => "Authenticated Anonymously"]; $formMapper->with('Roles')->add('addWhenGranted', "choice", array("label" => "Show when role is available", "placeholder" => "Please select a role", "choices" => $roles, "required" => false))->add('removeWhenGranted', "choice", array("label" => "Remove when role is available", "placeholder" => "Please select a role", "choices" => $roles, "required" => false))->end(); }
protected function configureFormFields(FormMapper $form) { parent::configureFormFields($form); $form->remove('name')->remove('linkType')->remove('route')->with('form.group_general')->add('parent', 'doctrine_phpcr_odm_tree', array('root_node' => $this->menuRoot, 'select_root_node' => false, 'choice_list' => array()))->end(); }