use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer; | use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer; | ||||
use Lc\SovBundle\Entity\File\File; | use Lc\SovBundle\Entity\File\File; | ||||
use Lc\SovBundle\Doctrine\Extension\FileInterface; | |||||
use Lc\SovBundle\Model\File\FileInterface; | |||||
use Lc\SovBundle\Doctrine\EntityManager; | use Lc\SovBundle\Doctrine\EntityManager; | ||||
use Symfony\Component\Form\AbstractType; | use Symfony\Component\Form\AbstractType; | ||||
use Symfony\Component\Form\DataTransformerInterface; | use Symfony\Component\Form\DataTransformerInterface; |
use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer; | use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer; | ||||
use Lc\SovBundle\Doctrine\EntityManager; | use Lc\SovBundle\Doctrine\EntityManager; | ||||
use Lc\SovBundle\Entity\File\File; | |||||
use Lc\SovBundle\Doctrine\Extension\FileInterface; | |||||
use Lc\SovBundle\Model\File\FileInterface; | |||||
use Lc\SovBundle\Model\User\UserInterface; | use Lc\SovBundle\Model\User\UserInterface; | ||||
use Symfony\Component\Form\AbstractType; | use Symfony\Component\Form\AbstractType; | ||||
use Symfony\Component\Form\Extension\Core\Type\EmailType; | use Symfony\Component\Form\Extension\Core\Type\EmailType; | ||||
public function buildForm(FormBuilderInterface $builder, array $options) | public function buildForm(FormBuilderInterface $builder, array $options) | ||||
{ | { | ||||
$entityName = $this->em->getEntityName(UserInterface::class) ; | |||||
$builder->add( | $builder->add( | ||||
'firstname', | 'firstname', | ||||
TextType::class, | TextType::class, | ||||
) | ) | ||||
); | ); | ||||
$builder->add( | |||||
'phone', | |||||
TextType::class, | |||||
array( | |||||
'label' => 'Téléphone' | |||||
) | |||||
); | |||||
if(property_exists($entityName, 'phone')) { | |||||
$builder->add( | |||||
'phone', | |||||
TextType::class, | |||||
array( | |||||
'label' => 'Téléphone' | |||||
) | |||||
); | |||||
} | |||||
$builder->add( | $builder->add( | ||||
'submit', | 'submit', |
_liip_imagine: | |||||
resource: "@LiipImagineBundle/Resources/config/routing.yaml" | |||||
artgris_bundle_file_manager: | |||||
resource: "@ArtgrisFileManagerBundle/Controller" | |||||
type: annotation | |||||
prefix: /manager | |||||
sov_login: | sov_login: | ||||
path: /login | path: /login |
</li> | </li> | ||||
{% for page in paginator.pageRange %} | {% for page in paginator.pageRange %} | ||||
<li class="page-item {{ page == paginator.currentPage ? 'active' }} {{ page is null ? 'disabled' }}"> | |||||
{% if page is null %} | |||||
<span class="page-link">…</span> | |||||
{% else %} | |||||
<a class="page-link" href="{{ paginator.generateUrlForPage(page) }}">{{ page }}</a> | |||||
{% endif %} | |||||
</li> | |||||
{% if page != 0 %} | |||||
<li class="page-item {{ page == paginator.currentPage ? 'active' }} {{ page is null ? 'disabled' }}"> | |||||
{% if page is null %} | |||||
<span class="page-link">…</span> | |||||
{% else %} | |||||
<a class="page-link" href="{{ paginator.generateUrlForPage(page) }}">{{ page }}</a> | |||||
{% endif %} | |||||
</li> | |||||
{% endif %} | |||||
{% endfor %} | {% endfor %} | ||||
<li class="page-item {{ not paginator.hasNextPage ? 'disabled' }}"> | <li class="page-item {{ not paginator.hasNextPage ? 'disabled' }}"> |