Bug fixes

Signed-off-by: Polonkai Gergely <polesz@w00d5t0ck.info>
This commit is contained in:
Polonkai Gergely
2012-07-31 10:14:26 +02:00
parent f21d48c6a8
commit b82eb93bf7
8 changed files with 41 additions and 34 deletions

View File

@@ -3,6 +3,7 @@ namespace KekRozsak\FrontBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class ForumPostType extends AbstractType
{
@@ -31,13 +32,11 @@ class ForumPostType extends AbstractType
return 'forum_post';
}
public function getDefaultOptions()
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
$opts = array(
$resolver->setDefaults(array(
'data_class' => 'KekRozsak\FrontBundle\Entity\ForumPost',
);
return $opts;
));
}
}

View File

@@ -3,6 +3,7 @@ namespace KekRozsak\FrontBundle\Form\Type;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolverInterface;
class UserDataType extends AbstractType
{
@@ -69,11 +70,11 @@ class UserDataType extends AbstractType
return 'user_data';
}
public function getDefaultOptions()
public function setDefaultOptions(OptionsResolverInterface $resolver)
{
return array(
$resolver->setDefaults(array(
'data_class' => 'KekRozsak\FrontBundle\Entity\UserData'
);
));
}
}