From fbe06c83308bd570d0b4b870c6050da13e469b75 Mon Sep 17 00:00:00 2001 From: Antoine LAVERRIERE Date: Mon, 21 Mar 2016 08:57:48 +0100 Subject: [PATCH] Fix #76 --- Controller/SettingsController.php | 3 ++- Resources/config/services.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Controller/SettingsController.php b/Controller/SettingsController.php index 09c3aab..8cd26a7 100644 --- a/Controller/SettingsController.php +++ b/Controller/SettingsController.php @@ -10,6 +10,7 @@ namespace Dmishh\SettingsBundle\Controller; use Dmishh\SettingsBundle\Entity\SettingsOwnerInterface; +use Dmishh\SettingsBundle\Form\Type\SettingsType; use Symfony\Bundle\FrameworkBundle\Controller\Controller; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\Security\Core\Exception\AccessDeniedException; @@ -92,7 +93,7 @@ public function manageOwnAction(Request $request) */ protected function manage(Request $request, SettingsOwnerInterface $owner = null) { - $form = $this->createForm('settings_management', $this->get('settings_manager')->all($owner)); + $form = $this->createForm(SettingsType::class, $this->get('settings_manager')->all($owner)); if ($request->isMethod('post')) { $form->handleRequest($request); diff --git a/Resources/config/services.yml b/Resources/config/services.yml index 4b59959..98438d1 100644 --- a/Resources/config/services.yml +++ b/Resources/config/services.yml @@ -26,7 +26,7 @@ services: arguments: - "%settings_manager.settings%" tags: - - { name: form.type, alias: settings_management } + - { name: form.type } twig.extension.settings_extension: class: Dmishh\SettingsBundle\Twig\SettingsExtension