public function panelSettingsAction()
    {
        $em = $this->getDoctrine()->getManager();
        $user = $this->get('security.context')->getToken()->getUser();

        $settingmanager = $this->get('acs.setting_manager');

        $user_fields = $settingmanager->loadUserFields();

        $object_settings = $settingmanager->getObjectSettingsPrototype($user);

        array_merge($user_fields, $object_settings);

        $form = $this->createForm(new ConfigSettingCollectionType($user_fields, $em), $user);

        $contexts = $settingmanager->getContexts($user);

        return $this->render('ACSACSPanelSettingsBundle:ConfigSetting:edit.html.twig', array(
            'entity' => $user,
            'contexts' => $contexts,
            'form'   => $form->createView(),
        ));
    }