@@ -4,7 +4,7 @@ namespace Lc\SovBundle\Form\Type\Crud; | |||
use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer; | |||
use Lc\SovBundle\Entity\File\File; | |||
use Lc\SovBundle\Doctrine\Extension\FileInterface; | |||
use Lc\SovBundle\Model\File\FileInterface; | |||
use Lc\SovBundle\Doctrine\EntityManager; | |||
use Symfony\Component\Form\AbstractType; | |||
use Symfony\Component\Form\DataTransformerInterface; |
@@ -4,8 +4,7 @@ namespace Lc\SovBundle\Form\Type\User; | |||
use Lc\SovBundle\DataTransformer\FileManagerTypeToDataTransformer; | |||
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 Symfony\Component\Form\AbstractType; | |||
use Symfony\Component\Form\Extension\Core\Type\EmailType; | |||
@@ -25,6 +24,8 @@ class ProfileFormType extends AbstractType | |||
public function buildForm(FormBuilderInterface $builder, array $options) | |||
{ | |||
$entityName = $this->em->getEntityName(UserInterface::class) ; | |||
$builder->add( | |||
'firstname', | |||
TextType::class, | |||
@@ -49,13 +50,15 @@ class ProfileFormType extends AbstractType | |||
) | |||
); | |||
$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( | |||
'submit', |
@@ -1,3 +1,10 @@ | |||
_liip_imagine: | |||
resource: "@LiipImagineBundle/Resources/config/routing.yaml" | |||
artgris_bundle_file_manager: | |||
resource: "@ArtgrisFileManagerBundle/Controller" | |||
type: annotation | |||
prefix: /manager | |||
sov_login: | |||
path: /login |
@@ -26,13 +26,15 @@ | |||
</li> | |||
{% 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 %} | |||
<li class="page-item {{ not paginator.hasNextPage ? 'disabled' }}"> |