62 lines
1.9 KiB
PHP
62 lines
1.9 KiB
PHP
<?php
|
|
namespace Cadoles\CoreBundle\Form;
|
|
|
|
use Symfony\Component\Form\AbstractType;
|
|
use Symfony\Component\Form\FormBuilderInterface;
|
|
use Symfony\Component\OptionsResolver\OptionsResolver;
|
|
use Symfony\Component\Form\Extension\Core\Type\EmailType;
|
|
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
|
use Symfony\Component\Form\Extension\Core\Type\TextareaType;
|
|
use Symfony\Component\Form\Extension\Core\Type\IntegerType;
|
|
use Symfony\Component\Form\Extension\Core\Type\RepeatedType;
|
|
use Symfony\Component\Form\Extension\Core\Type\PasswordType;
|
|
use Symfony\Component\Form\Extension\Core\Type\HiddenType;
|
|
use Symfony\Component\Form\Extension\Core\Type\ButtonType;
|
|
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
|
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
|
|
|
|
|
use Doctrine\ORM\EntityRepository;
|
|
use Doctrine\ORM\EntityManager;
|
|
|
|
class ApplicationType extends AbstractType
|
|
{
|
|
public function buildForm(FormBuilderInterface $builder, array $options)
|
|
{
|
|
$builder->add('submit',
|
|
SubmitType::class, [
|
|
"label" => "Valider",
|
|
"attr" => ["class" => "btn btn-success"]
|
|
]
|
|
);
|
|
|
|
$builder->add('name',
|
|
TextType::class, [
|
|
"label" =>"Nom"
|
|
]
|
|
);
|
|
|
|
$builder->add('package',
|
|
TextType::class, [
|
|
"label" =>"Paquet"
|
|
]
|
|
);
|
|
|
|
$builder->add('description',
|
|
TextareaType::class, [
|
|
"label" =>"Paquet",
|
|
"required" => false,
|
|
"attr" => array("rows" => '4')
|
|
]
|
|
);
|
|
}
|
|
|
|
public function configureOptions(OptionsResolver $resolver)
|
|
{
|
|
$resolver->setDefaults(array(
|
|
'data_class' => 'Cadoles\CoreBundle\Entity\Application',
|
|
'mode' => 'string'
|
|
));
|
|
}
|
|
}
|