mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 22:53:49 +00:00
user: current location edit form and page
This commit is contained in:
23
src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php
Normal file
23
src/Bundle/ChillMainBundle/Form/UserCurrentLocationType.php
Normal file
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Chill\MainBundle\Form;
|
||||
|
||||
use Chill\MainBundle\Entity\Location;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
|
||||
class UserCurrentLocationType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder
|
||||
->add('location', EntityType::class, [
|
||||
'class' => Location::class,
|
||||
'choice_label' => function (Location $entity) {
|
||||
return $entity->getName();
|
||||
},
|
||||
]);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user