Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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
You can’t perform that action at this time.