Skip to content

Instantly share code, notes, and snippets.

@JoshuaEstes
Last active October 9, 2015 20:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JoshuaEstes/164bf83d3f23df8c96ba to your computer and use it in GitHub Desktop.
Save JoshuaEstes/164bf83d3f23df8c96ba to your computer and use it in GitHub Desktop.
<?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