Last active
October 9, 2015 20:18
-
-
Save JoshuaEstes/164bf83d3f23df8c96ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace AppBundle\Form\Type; | |
use Symfony\Component\Form\AbstractType; | |
use AppBundle\Form\DataMapper\UserSettingDataMapper; | |
class UserProfileSettingsType extends AbstractType | |
{ | |
public function buildForm(FormBuilderInterface $build, array $options) | |
{ | |
$builder->setDataMapper(new UserSettingDataMapper()); | |
$builder->add('locale', 'locale', array( | |
'required' => false, | |
)); | |
} | |
public function configureOptions(OptionsResolver $resolver) | |
{ | |
$resolver->setDefaults(array( | |
'data_class' => 'AppBundle\Entity\User', | |
)); | |
} | |
public function getName() | |
{ | |
return 'profile_settings'; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment