Skip to content

Instantly share code, notes, and snippets.

@mhlavac
Last active May 24, 2016 13:27
Show Gist options
  • Save mhlavac/550587f6af783f3d59ca156f319ffbf0 to your computer and use it in GitHub Desktop.
Save mhlavac/550587f6af783f3d59ca156f319ffbf0 to your computer and use it in GitHub Desktop.
<?php
class User
{
public function getThis()
{
return $this;
}
public function setThis($that)
{
}
}
<?php
class UserType extends \Symfony\Component\Form\AbstractType
{
public function buildForm(\Symfony\Component\Form\FormBuilderInterface $builder, array $options)
{
$builder->add('name', CompoundType::class, [
'property_path' => 'this'
]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment