for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/*
* This file is part of monofony.
*
* (c) Mobizel
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
declare(strict_types=1);
namespace App\Form\Type\User;
use App\Entity\User\AdminAvatar;
use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\Extension\Core\Type\FileType;
use Symfony\Component\Form\FormBuilderInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
final class AdminAvatarType extends AbstractType
{
/**
* {@inheritdoc}
public function buildForm(FormBuilderInterface $builder, array $options): void
parent::buildForm($builder, $options);
$builder
->add('file', FileType::class, [
'label' => false,
])
;
}
public function configureOptions(OptionsResolver $resolver): void
$resolver
->setDefaults([
'data_class' => AdminAvatar::class,
public function getBlockPrefix(): string
return 'app_admin_avatar';