Skip to content

Commit

Permalink
Merge pull request #77 from Atyz/fix-76
Browse files Browse the repository at this point in the history
Make the form more SF3.0 compatible, Fix #76
  • Loading branch information
Nyholm committed Mar 21, 2016
2 parents c1fa3e4 + fbe06c8 commit b62e928
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Resources/config/services.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b62e928

Please sign in to comment.